fix: handle code separately

This commit is contained in:
Livio Amstutz 2020-05-29 09:35:20 +02:00
parent 303fdfc421
commit a56c3f92c3
7 changed files with 69 additions and 24 deletions

View file

@ -29,6 +29,11 @@ func CreateTokenResponse(ctx context.Context, authReq AuthRequest, client Client
return nil, err
}
err = creator.Storage().DeleteAuthRequest(ctx, authReq.GetID())
if err != nil {
return nil, err
}
exp := uint64(validity.Seconds())
return &oidc.AccessTokenResponse{
AccessToken: accessToken,