-
Notifications
You must be signed in to change notification settings - Fork 9
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
Thomas/check email verification #441
Thomas/check email verification #441
Conversation
type FireBaseTokenRepository interface { | ||
VerifyFirebaseToken(ctx context.Context, firebaseToken string) (models.FirebaseIdentity, error) |
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.
Only declare the interface of what is expected to be injected here
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.
let's have a look at this one tomorrow if you want : it's probably not the right place to put this
FirebaseTokenRepository: FireBaseTokenRepository{ | ||
firebaseClient: firebaseClient, | ||
}, | ||
FirebaseTokenRepository: firebase.New(firebaseClient), |
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.
Inject an instance of the already factorised firebase repository
type FireBaseTokenRepository interface { | ||
VerifyFirebaseToken(ctx context.Context, firebaseToken string) (models.FirebaseIdentity, error) |
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.
let's have a look at this one tomorrow if you want : it's probably not the right place to put this
} | ||
return c.verifier.VerifySessionCookie(ctx, firebaseToken) | ||
if token.Firebase.SignInProvider == "password" && token.Claims["email_verified"] == false { |
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.
sorry, j'avais oublié de valider
* feat(auth): return error message when user is unknown * feat(auth): add email verification check (#441)
In this PR :
Linear Issue