I hereby claim:
- I am ikovic on github.
- I am ikovic (https://keybase.io/ikovic) on keybase.
- I have a public key ASBHlZvo_jzEEzC9VLoqLK7zcdLC4Ob1dcLwEfJK1Dj3WQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<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(); |
// login route action handler receives the token as form data and persists it as a cookie | |
export async function action({ request }: ActionArgs) { | |
const formData = await request.formData(); | |
const token = formData.get("token") as string; | |
const redirectTo = getRedirectToFromForm(formData); | |
if (!token) return handleFailure(request); | |
await handleSignInSuccess(token); |
import { SlashIDProvider, DynamicFlow } from "@slashid/react"; // available from 1.6.4. | |
// first define a function that takes an email and returns a Factor | |
const getFactor = (email: string) => { | |
const domain = email.split("@")[1]; | |
if (domain === "<REPLACE WITH THE DOMAIN>") { | |
return { | |
method: "oidc", | |
options: { |