(signinResponse: SigninResponse, verifySub?: string)
| 546 | } |
| 547 | |
| 548 | protected async _buildUser(signinResponse: SigninResponse, verifySub?: string) { |
| 549 | const logger = this._logger.create("_buildUser"); |
| 550 | const user = new User(signinResponse); |
| 551 | if (verifySub) { |
| 552 | if (verifySub !== user.profile.sub) { |
| 553 | logger.debug("current user does not match user returned from signin. sub from signin:", user.profile.sub); |
| 554 | throw new ErrorResponse({ ...signinResponse, error: "login_required" }); |
| 555 | } |
| 556 | logger.debug("current user matches user returned from signin"); |
| 557 | } |
| 558 | |
| 559 | await this.storeUser(user); |
| 560 | logger.debug("user stored"); |
| 561 | await this._events.load(user); |
| 562 | |
| 563 | return user; |
| 564 | } |
| 565 | |
| 566 | /** |
| 567 | * Trigger a redirect of the current window to the end session endpoint. |
no test coverage detected