springdoc / springdoc-openapi-demos

Demo for OpenAPI 3 with spring-boot
http://springdoc.org
Apache License 2.0
511 stars 274 forks source link

Authorization flow with PKCE. #21

Closed ghost closed 4 years ago

ghost commented 4 years ago

Can you please show the Authorization flow with PKCE, it will be great.

bnasslahsen commented 4 years ago

Hi @anandjaisy,

In order to be able to make calls from the swagger-ui, you need to declare à new application in Okta as SPA:

springdoc.swagger-ui.oauth.client-id=yourSPAClientId
springdoc.swagger-ui.oauth.additional-query-string-params.state=xyz
springdoc.swagger-ui.oauth.additional-query-string-params.nonce=abc
springdoc.swagger-ui.oauth.use-pkce-with-authorization-code-grant=true
springdoc.oAuthFlow.authorizationUrl=${okta.client.orgUrl}/oauth2/v1/authorize
springdoc.oAuthFlow.tokenUrl=${okta.client.orgUrl}/oauth2/v1/token
emmaLP commented 3 years ago

The link to the sample repo returns 404, please can you provide an updated link as I'm struggling to get this working with the latest spring boot (2.4.0) and okta

bnasslahsen commented 3 years ago

@emmaLP,

The repository seems to be deleted.

You can see the discussions here if it can help: