fix: return auth request even on error (in next steps) (#2588)

* fix return auth request even on error (in next steps)

* Update README.md

* Update README.md
This commit is contained in:
Livio Amstutz 2021-10-28 14:50:29 +02:00 committed by GitHub
parent c190d5d1b7
commit b3b4d5dde9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -457,7 +457,7 @@ func (repo *AuthRequestRepo) getAuthRequestNextSteps(ctx context.Context, id, us
}
steps, err := repo.nextSteps(ctx, request, checkLoggedIn)
if err != nil {
return nil, err
return request, err
}
request.PossibleSteps = steps
return request, nil

View File

@ -25,7 +25,7 @@ func (l *Login) getAuthRequest(r *http.Request) (*domain.AuthRequest, error) {
func (l *Login) getAuthRequestAndParseData(r *http.Request, data interface{}) (*domain.AuthRequest, error) {
authReq, err := l.getAuthRequest(r)
if err != nil {
return nil, err
return authReq, err
}
err = l.parser.Parse(r, data)
return authReq, err