Created
April 8, 2023 08:37
-
-
Save ikovic/dc16ef057ec2aee546a8f770488fac0e to your computer and use it in GitHub Desktop.
Kakaku /id integration example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="module"> | |
// alternatively include the script in whatever way is convenient | |
import { SlashID } from "@slashid/slashid"; | |
addEventListener("load", async (event) => { | |
const sid = new SlashID() | |
const ATTRIBUTE_KAKAKU_HANDLE = "@slashid/kakaku/LAST_HANDLE"; | |
const user = await sid.getUserFromURL() | |
const bucket = user.getBucket(); | |
const email = await bucket.get([ATTRIBUTE_KAKAKU_HANDLE]); | |
// proceed with the login - email will reflect what was used to log in | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment