Redirect when already authenticated
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -153,11 +153,6 @@ func (r *frameworkResolver) DarkLogoURL(ctx context.Context, obj *types.Framewor
|
||||
|
||||
// SendMagicLink is the resolver for the sendMagicLink field.
|
||||
func (r *mutationResolver) SendMagicLink(ctx context.Context, input types.SendMagicLinkInput) (*types.SendMagicLinkPayload, error) {
|
||||
identity := authn.IdentityFromContext(ctx)
|
||||
if identity != nil {
|
||||
return nil, gqlutils.AlreadyAuthenticatedf(ctx, "already authenticated")
|
||||
}
|
||||
|
||||
trustCenter := compliancepage.CompliancePageFromContext(ctx)
|
||||
|
||||
req := &iam.SendMagicLinkRequest{
|
||||
|
||||
Reference in New Issue
Block a user