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

Support passing a tenant name for the OAuth endpoint #4

Open
trs80 opened this issue Apr 1, 2020 · 4 comments
Open

Support passing a tenant name for the OAuth endpoint #4

trs80 opened this issue Apr 1, 2020 · 4 comments

Comments

@trs80
Copy link

trs80 commented Apr 1, 2020

The authorize and token urls need to be customisable to include a tenant name, to support single-tenant app registration

authorize_url: '/common/oauth2/v2.0/authorize',

https://stackoverflow.com/questions/53526121/use-a-tenant-specific-endpoint-or-configure-the-application-to-be-multi-tenant

@babington-andy
Copy link

This is pretty critical for me too, without this a user from any office365 tenant can authenticate.

@werk21
Copy link

werk21 commented Feb 6, 2021

You need to adapt lines 18 and 19:

              authorize_url: '/common/oauth2/v2.0/authorize',
              token_url:     '/common/oauth2/v2.0/token'

to something like this:

              authorize_url: '/mytenant/oauth2/v2.0/authorize
              token_url: '/mytenant/oauth2/v2.0/token

@werk21
Copy link

werk21 commented Mar 19, 2021

We forked your repo to https://github.com/werk21/omniauth-bn-office365/ and added this feature. Just set OFFICE365_TENANT in ENV.

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

No branches or pull requests

3 participants