fix: handle code separately (#30)

This commit is contained in:
Livio Amstutz 2020-05-29 09:40:34 +02:00 committed by GitHub
parent 303fdfc421
commit 58545a1710
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,