Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Nov 8, 2024
1 parent 1087654 commit 01511e3
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions go/controller/post_signin_idtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (ctrl *Controller) PostSigninIdtoken( //nolint:ireturn
}

if found {
return ctrl.postSigninIdtokenSignin(ctx, req, user, token, logger)
return ctrl.postSigninIdtokenSignin(ctx, user, logger)
}

return ctrl.postSigninIdtokenSignup(ctx, req, profile, logger)
Expand Down Expand Up @@ -280,11 +280,18 @@ func (ctrl *Controller) postSigninIdtokenSignupWithoutSession(

func (ctrl *Controller) postSigninIdtokenSignin( //nolint:ireturn
ctx context.Context,
req api.PostSigninIdtokenRequestObject,
user sql.AuthUser,
token *jwt.Token,
logger *slog.Logger,
) (api.PostSigninIdtokenResponseObject, error) {
logger.Info("user found, signing in")
return nil, nil

session, err := ctrl.wf.NewSession(ctx, user, logger)
if err != nil {
logger.Error("error getting new session", logError(err))
return ctrl.sendError(ErrInternalServerError), nil
}

return api.PostSigninIdtoken200JSONResponse{
Session: session,
}, nil
}

0 comments on commit 01511e3

Please sign in to comment.