-
Notifications
You must be signed in to change notification settings - Fork 1
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
ENG-0000 fix(portal,1ui): Fix Privy auth issues #939
Conversation
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.
Left comments in our thread too. Still reading through but want to surface current comments!
@@ -31,6 +32,10 @@ export default function PrivyLoginButton({ | |||
setLoading(true) | |||
login() | |||
} | |||
useEffect(() => { |
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.
So this would force the logout to ensure it's cleared fully before logging in?
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.
Minor changes to remove console logs -- great job! Works very well! 🎉
useEffect(() => { | ||
if (accessToken) { | ||
// instead of revalidating, redirect to same route and replace true | ||
console.log('Redirecting to', `${refreshPath}?redirectTo=${redirectTo}`) |
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.
console.log('Redirecting to', `${refreshPath}?redirectTo=${redirectTo}`) | |
logger('Redirecting to', `${refreshPath}?redirectTo=${redirectTo}`) |
} | ||
|
||
// Then get the full user object directly using the verified user ID | ||
const user = await privyClient.getUserById(verifiedClaims.userId) |
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.
Nice!
Co-authored-by: Jonathan Prozzi <[email protected]> Signed-off-by: jojikun <[email protected]>
Co-authored-by: Jonathan Prozzi <[email protected]> Signed-off-by: jojikun <[email protected]>
Co-authored-by: Jonathan Prozzi <[email protected]> Signed-off-by: jojikun <[email protected]>
Co-authored-by: Jonathan Prozzi <[email protected]> Signed-off-by: jojikun <[email protected]>
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.
🎉 beast mode
Affected Packages
Apps
Packages
Tools
Overview
Overview of the changes in the PR.
Screen Captures
If applicable, add screenshots or screen captures of your changes.
Declaration