fix unreliable 'successful' flag, don't set content-type on leave_open
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -86,7 +86,7 @@ class AuthRequest {
|
||||
data,
|
||||
leave_open
|
||||
}: AccessSettings): Promise<AccessResult> {
|
||||
this.default_header (typeof redirect_to !== 'string');
|
||||
this.default_header (typeof redirect_to !== 'string' && !leave_open);
|
||||
|
||||
const at = await auth.sign (
|
||||
'access_token',
|
||||
@ -122,6 +122,8 @@ class AuthRequest {
|
||||
result.refresh_token_id = rt.id;
|
||||
}
|
||||
|
||||
this._is_successful = true;
|
||||
|
||||
if (typeof redirect_to === 'string') {
|
||||
this.response.setHeader ('Location', redirect_to);
|
||||
this.response.statusCode = 302;
|
||||
@ -135,7 +137,6 @@ class AuthRequest {
|
||||
this.response.end (JSON.stringify (res));
|
||||
}
|
||||
|
||||
this._is_successful = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user