-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use auth0 #599
Conversation
|
||
import { Auth0Provider } from '@auth0/auth0-react'; | ||
|
||
export default Auth0Provider; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need use client
so the Auth0Provider works but we need to extract it so we can set metadata in the root page.
1b92a01
to
6dbf074
Compare
@@ -37,7 +42,17 @@ export default function RootLayout({ | |||
<html lang="en"> | |||
<body> | |||
<noscript>You need to enable JavaScript to run this app.</noscript> | |||
{children} | |||
<Auth0Provider | |||
domain={`maffin${isProd() ? '' : '-dev'}.eu.auth0.com`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have different tenants for development and production
{children} | ||
<Auth0Provider | ||
domain={`maffin${isProd() ? '' : '-dev'}.eu.auth0.com`} | ||
clientId={isProd() ? 'cEXnN96kEP3ER2EDJjmjRW0u2MEFBUKK' : 'mMmnR4NbQOnim9B8QZfe9wfFuaKb8rwW'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each app in Auth0 has a different clientId
Move to using auth0 for managing users. Good because we can remove the
authorize
andrefresh
endpoints from Stocker and interact directly with auth0 using theauth0-react
library.Note we are doing some unofficial stuff to extract the Google access_token from Auth0 (maffin-io/maffin-blog#259)