-
-
Notifications
You must be signed in to change notification settings - Fork 38
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: verify email #249
base: master
Are you sure you want to change the base?
feat: verify email #249
Conversation
todo: create verification email template
todo: check it works using the client
@@ -1,5 +1,6 @@ | |||
import { UnauthorizedException, BadRequestException } from '@nestjs/common'; | |||
import { Test } from '@nestjs/testing'; | |||
import { Request } from '🧙♂️/types/request'; |
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.
lol, what's with the 🧙♂️ in the filepath?
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.
I was exciting to use tsconfig/paths for the first time :)
find-a-mentor-api/tsconfig.json
Lines 14 to 16 in bc67ded
"paths": { | |
"🧙♂️/types/*": ["src/types/*"] | |
} |
🧙♂️ is our paths
root
const payload = { | ||
result_url: Config.urls.CLIENT_BASE_URL, | ||
user_id: auth0UserId, | ||
identity: { user_id: userId, provider }, |
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.
Out of curiousity, why are you stripping of the first part of the userId?
It looks like you refer to userId as the part behind the |
, while at Auth0 we refer to a userId including what's in front of the |
.
Looking at https://auth0.com/docs/manage-users/user-accounts/identify-users, it seems to be that we guarantee the userId to be unique in a tenant (which means, including the part before the |
). I am not sure there is any guarantee the part behind the |
is unique across multiple providers.
That said, I am not entirely sure here. But if u don't need to strip it, I wouldn't strip it.
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.
First, this is what works for me :)
The payload's user_id
is indeed the full userId.
The identify
is the combination of stripped userId and the provider.
Isn't that combination guarantee unique userId?
I can try passing the full userId in identify if you think it ahould work.
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.
I just wanted to call it out that you are aware. Not asking to change anything. The most important part is that it works for u, just as I mentioned ... If u don't need the stripping, I wouldn't do it. But if u need it, u need it.
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.
Isn't that combination guarantee unique userId?
Yes but the prefix is part of the userId for us. So seeing it stripped of while still referring to it as a userId can be confusing if you are used to Auth0 UserId's.
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.
Are you saying I should use the full userid or should I name it differently? If 2, any suggestion?
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.
Are you saying I should use the full userid or should I name it differently? If 2, any suggestion?
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.
I think as long as you are aware of the importance of the provider, you should be fine either way.
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.
Thank you!
todo: verify all current users (api)
Client PR - Coding-Coach/find-a-mentor#925