Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Configurable auth and token endpoints #9

Closed
wants to merge 1 commit into from

Conversation

t-knapp
Copy link
Contributor

@t-knapp t-knapp commented Jul 10, 2021

Enable configuration to use more providers.

Keycloak as an example uses /auth instead of /authorize so unfortunately this package does not work out-of-the box.

Kind regards.

@@ -173,7 +175,7 @@ export class AuthService<TIDToken = JWTIDToken> {
codeChallengeMethod: 'S256'
}
// Responds with a 302 redirect
const url = `${provider}/authorize?${toUrlEncoded(query)}`
const url = `${authorizeEndpoint || `${provider}/authorize`}?${toUrlEncoded(query)}`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backticks look odd here. Are you sure this is right?

`${authorizeEndpoint || `${provider}/authorize`}?${toUrlEncoded(query)}`

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I see it's nested.

@@ -10,6 +10,8 @@ export interface AuthServiceProps {
contentType?: string
location: Location
provider: string
authorizeEndpoint: string
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this make them required parameters? That might break existing code out there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. This should be optional to not break existing usages.

@t-knapp
Copy link
Contributor Author

t-knapp commented Jul 27, 2021

I'll close this PR since I don't have access to the fork. I'll file a new PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants