Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect origin for urls of different forms #1538

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

inc-osaulenko
Copy link

Currently, origin is detected by taking the part of URL prior to /oauth2/ and for URLs like this

https://www.domain.com/oauth2/{some-client-id}

It works as expected. However, when the service that uses OKTA API is behind a multi-tenant proxy and URL will be like

https://www.domain.com/{lang}/{tenant-id}/oauth2/{some-client-id}

It doesn't work. There is an option to do the same thing using (new URL('...')).origin but that will require to add another polyfill for IE11. This one uses Array.prototype.split which is available in IE11 and requires no polyfill.

@jaredperreault-okta
Copy link
Contributor

Thank you for the submission!

Internal Ref: OKTA-805980

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

Successfully merging this pull request may close these issues.

2 participants