mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 17:55:17 -04:00
feat(auth): add OIDC state parameter
Some checks failed
Docker / build-and-push (frontend) (push) Has been cancelled
E2E Tests / backend-sqlite (push) Has been cancelled
E2E Tests / backend-mariadb (push) Has been cancelled
Run tests & build / Test and build with NodeJS 20 (push) Has been cancelled
Docker / build-and-push (backend) (push) Has been cancelled
E2E Tests / backend-postgres (push) Has been cancelled
E2E Tests / Build test build of frontend (push) Has been cancelled
Lint and check format / Lint files and check formatting (push) Has been cancelled
REUSE Compliance Check / reuse (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Static Analysis / Njsscan code scanning (push) Has been cancelled
Static Analysis / CodeQL analysis (push) Has been cancelled
E2E Tests / frontend-cypress (1) (push) Has been cancelled
E2E Tests / frontend-cypress (2) (push) Has been cancelled
E2E Tests / frontend-cypress (3) (push) Has been cancelled
Some checks failed
Docker / build-and-push (frontend) (push) Has been cancelled
E2E Tests / backend-sqlite (push) Has been cancelled
E2E Tests / backend-mariadb (push) Has been cancelled
Run tests & build / Test and build with NodeJS 20 (push) Has been cancelled
Docker / build-and-push (backend) (push) Has been cancelled
E2E Tests / backend-postgres (push) Has been cancelled
E2E Tests / Build test build of frontend (push) Has been cancelled
Lint and check format / Lint files and check formatting (push) Has been cancelled
REUSE Compliance Check / reuse (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Static Analysis / Njsscan code scanning (push) Has been cancelled
Static Analysis / CodeQL analysis (push) Has been cancelled
E2E Tests / frontend-cypress (1) (push) Has been cancelled
E2E Tests / frontend-cypress (2) (push) Has been cancelled
E2E Tests / frontend-cypress (3) (push) Has been cancelled
Signed-off-by: Ivan Li <ivanli2048@gmail.com>
This commit is contained in:
parent
8b6bedab39
commit
19f4baf79b
3 changed files with 26 additions and 1 deletions
|
@ -41,12 +41,15 @@ export class OidcController {
|
|||
@Param('oidcIdentifier') oidcIdentifier: string,
|
||||
): { url: string } {
|
||||
const code = this.oidcService.generateCode();
|
||||
const state = this.oidcService.generateState();
|
||||
request.session.oidcLoginCode = code;
|
||||
request.session.oidcLoginState = state;
|
||||
request.session.authProviderType = ProviderType.OIDC;
|
||||
request.session.authProviderIdentifier = oidcIdentifier;
|
||||
const authorizationUrl = this.oidcService.getAuthorizationUrl(
|
||||
oidcIdentifier,
|
||||
code,
|
||||
state,
|
||||
);
|
||||
return { url: authorizationUrl };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue