-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
Authentication fixes/improvements #3174
Authentication fixes/improvements #3174
Conversation
@@ -1627,7 +1627,12 @@ export default function ToolpadApp({ rootRef, basename, state }: ToolpadAppProps | |||
(window as any).toggleDevtools = () => toggleDevtools(); | |||
}, [toggleDevtools]); | |||
|
|||
const authContext = useAuth({ dom, basename, isRenderedInCanvas: IS_RENDERED_IN_CANVAS }); | |||
const authContext = useAuth({ |
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.
No need to pass this around anymore, can get it from context, see #3170
@@ -13,6 +13,8 @@ import { asyncHandler } from '../utils/express'; | |||
import { adaptRequestFromExpressToFetch } from './httpApiAdapters'; | |||
import type { ToolpadProject } from './localMode'; | |||
|
|||
globalThis.crypto ??= (await import('node:crypto')) as Crypto; |
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.
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.
Ok, I've added a comment too explaining why we have the polyfill 62ac5f3
crypto
for Node 18 usersCloses #3172