We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55af71a commit 9c18244Copy full SHA for 9c18244
src/components/Header/components/SignInJoin.tsx
@@ -1,11 +1,14 @@
1
+import { env } from '@/env.mjs';
2
import { signIn } from 'next-auth/react';
3
import Link from 'next/link';
4
import Button from '../../Button';
5
6
export function SignInJoin() {
7
+ const redirectUri = `${env.NEXT_PUBLIC_KEYCLOAK_REDIRECT_URI}?registered`;
8
+ const authUrl = `${env.NEXT_PUBLIC_AUTH_KEYCLOAK_ISSUER}/protocol/openid-connect/auth?response_type=code&client_id=website&redirect_uri=${redirectUri}&scope=openid+profile+email`;
9
return (
10
<>
- <Button colour="orange" onClick={() => signIn('keycloak')}>
11
+ <Button colour="orange" href={authUrl}>
12
Sign In
13
</Button>
14
<Button colour="purple" href="/join">
0 commit comments