mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed more tests
refs 8630be5a87
- referenced commit skipped current user and proxy service population when `skipAuthSuccessHandler` was set but the population is needed during setup
- `skipAuthSuccessHandler` is used for skipping the post-authentication transition rather than skipping all post-auth behaviour so the the post-auth behaviour was reintroduced but put in a guard so we don't try to do it again when it's already been run
This commit is contained in:
parent
a7dc63cfab
commit
9bc799258d
1 changed files with 10 additions and 8 deletions
|
@ -56,11 +56,7 @@ export default class SessionService extends ESASessionService {
|
||||||
}
|
}
|
||||||
|
|
||||||
async handleAuthentication() {
|
async handleAuthentication() {
|
||||||
if (this.skipAuthSuccessHandler) {
|
if (!this.user) {
|
||||||
this.skipAuthSuccessHandler = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.populateUser();
|
await this.populateUser();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -68,6 +64,12 @@ export default class SessionService extends ESASessionService {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.postAuthPreparation();
|
await this.postAuthPreparation();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.skipAuthSuccessHandler) {
|
||||||
|
this.skipAuthSuccessHandler = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
super.handleAuthentication('home');
|
super.handleAuthentication('home');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue