Skip to content

Commit

Permalink
chore(examples): use string as authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Apr 6, 2024
1 parent 41295db commit 5ae5009
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions packages/core/src/lib/pages/signin.tsx
Expand Up @@ -132,7 +132,7 @@ export default function SigninPage(props: {
;({
bg = "",
text = "",
logo = "",
logo = `${provider.id}.svg`,
bgDark = bg,
textDark = text,
logoDark = "",
Expand Down Expand Up @@ -192,7 +192,9 @@ export default function SigninPage(props: {
</button>
</form>
) : null}
{(provider.type === "email" || provider.type === "credentials" || provider.type === "webauthn") &&
{(provider.type === "email" ||
provider.type === "credentials" ||
provider.type === "webauthn") &&
i > 0 &&
providers[i - 1].type !== "email" &&
providers[i - 1].type !== "credentials" &&
Expand Down Expand Up @@ -250,7 +252,11 @@ export default function SigninPage(props: {
</form>
)}
{provider.type === "webauthn" && (
<form action={provider.callbackUrl} method="POST" id={`${provider.id}-form`}>
<form
action={provider.callbackUrl}
method="POST"
id={`${provider.id}-form`}
>
<input type="hidden" name="csrfToken" value={csrfToken} />
{Object.keys(provider.formFields).map((field) => {
return (
Expand All @@ -274,12 +280,18 @@ export default function SigninPage(props: {
</div>
)
})}
<button id={`submitButton-${provider.id}`} type="submit" tabIndex={0}>
<button
id={`submitButton-${provider.id}`}
type="submit"
tabIndex={0}
>
Sign in with {provider.name}
</button>
</form>
)}
{(provider.type === "email" || provider.type === "credentials" || provider.type === "webauthn") &&
{(provider.type === "email" ||
provider.type === "credentials" ||
provider.type === "webauthn") &&
i + 1 < providers.length && <hr />}
</div>
)
Expand Down

0 comments on commit 5ae5009

Please sign in to comment.