mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-06 18:10:29 +08:00
feat: improve error handling in AutoSigninFilter
This commit is contained in:
@@ -66,6 +66,10 @@ func AutoSigninFilter(ctx *context.Context) {
|
||||
responseError(ctx, err.Error())
|
||||
return
|
||||
}
|
||||
if application == nil {
|
||||
responseError(ctx, fmt.Sprintf("No application is found for userId: app/%s", token.Application))
|
||||
return
|
||||
}
|
||||
|
||||
setSessionUser(ctx, userId)
|
||||
setSessionOidc(ctx, token.Scope, application.ClientId)
|
||||
|
Reference in New Issue
Block a user