Skip to content

Instantly share code, notes, and snippets.

@ikovic
Created April 8, 2023 08:37
Show Gist options
  • Save ikovic/dc16ef057ec2aee546a8f770488fac0e to your computer and use it in GitHub Desktop.
Save ikovic/dc16ef057ec2aee546a8f770488fac0e to your computer and use it in GitHub Desktop.
Kakaku /id integration example
<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