-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
feat: add mobile login handler #1207
Conversation
chore: remove dead code
FYI @clintonlunn
|
@@ -30,7 +30,7 @@ | |||
"@turf/line-to-polygon": "^6.5.0", | |||
"@udecode/zustood": "^1.1.3", | |||
"@vercel/edge": "^1.1.1", | |||
"auth0": "^2.42.0", | |||
"auth0": "^4.12.0", |
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.
Jumping from v2 -> v4 broke a lot of user management code
if (roleObj.name != null && roleObj.id != null && !roles.includes(roleObj.name)) { | ||
res.push(roleObj.id) | ||
} | ||
return res | ||
}, []) | ||
// Removes roles that the user doesn't even have, but that's ok. | ||
if (roleIdsToRemove.length > 0) await auth0ManagementClient.removeRolesFromUser({ id: userId }, { roles: roleIdsToRemove }) | ||
if (roleIdsToRemove.length > 0) await auth0ManagementClient.users.deleteRoles({ id: userId }, { roles: roleIdsToRemove }) |
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.
is the intent of this to delete roles from the user or delete the role from auth0 all together? it seems the original intent was to just remove a role from a user. (not familiar with this so i can be off in my assumptions)
actually since you're specifying users you're probably deleting from the user itself, not the entire role
username, | ||
password, | ||
scope: 'openid profile email offline_access', | ||
audience: 'https://api.openbeta.io' |
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.
should this be generalized to whatever the current environment is?
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.
The settings are identical for both dev/stg and prod.
try { | ||
response = await auth0Client.oauth.refreshTokenGrant({ | ||
refresh_token: refreshToken, | ||
audience: 'https://api.openbeta.io' |
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.
same comment as above
What type of PR is this?(check all applicable)
What this PR achieves