Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-03-04 20:38:56 +04:00
parent 1af887e4d1
commit 54e0353833
2 changed files with 2 additions and 2 deletions

View File

@@ -673,7 +673,7 @@ func (s AuthService) SendMagicLink(ctx context.Context, req *SendMagicLinkReques
)
}
func (s AuthService) GetMagincLinkEmail(ctx context.Context, tokenString string) (mail.Addr, error) {
func (s AuthService) GetMagicLinkEmail(ctx context.Context, tokenString string) (mail.Addr, error) {
payload, err := statelesstoken.ValidateToken[MagicLinkData](s.tokenSecret, TokenTypeMagicLink, tokenString)
if err != nil {
return mail.Nil, NewInvalidTokenError()

View File

@@ -213,7 +213,7 @@ func (r *mutationResolver) VerifyMagicLink(ctx context.Context, input types.Veri
session := authn.SessionFromContext(ctx)
identity := authn.IdentityFromContext(ctx)
email, err := r.iam.AuthService.GetMagincLinkEmail(ctx, input.Token)
email, err := r.iam.AuthService.GetMagicLinkEmail(ctx, input.Token)
if err != nil {
var errInvalidToken *iam.ErrInvalidToken
if errors.As(err, &errInvalidToken) {