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

how to work with endpoints with different hosts but same provider #120

Open
ssoulless opened this issue Jun 29, 2022 · 3 comments
Open

how to work with endpoints with different hosts but same provider #120

ssoulless opened this issue Jun 29, 2022 · 3 comments

Comments

@ssoulless
Copy link

I have two endpoints one for Authorization and another for token:

Authorization endpoint: https://oauth.provider.com/authorize

Token endpoint: https://oauth-secured.provider.com/token

as you can see each one has a different host, but are the same provider, I'm not sure how to configure this in the gem as you can only specify one host:

config.omniauth :openid_connect, 
{ 
    name: :openid_connect,
    scope: [:openid],
    issuer: "oauth.provider.com"
    response_type: :code,
    discovery: :true,
    client_options:
    {
    port: 443,
    scheme: "https",
    host: "oauth.provider.com",
    authorization_endpoint: "/authorize", 
    token_endpoint: "/token", #How to specify here correctly https://oauth-secured.provider.com/token
    identifier: 'CLIENT_ID', 
    secret: 'CLIENT_SECRET', 
    redirect_uri: "https://myapp.com/users/auth/openid_connect/callback", 
    }, 
  }
@ssoulless
Copy link
Author

possible workaround here

@stanhu
Copy link
Contributor

stanhu commented Dec 28, 2022

@phyzalis
Copy link

phyzalis commented Jan 3, 2023

I have facing the same issue.

When I try to set an absolute URI in token_endpoint I have this error

Authentication failure! Request URI must have schema. Possibly add 'http://' to the request URI?: ArgumentError, Request URI must have schema. Possibly add 'http://' to the request URI?

I've had a look at both answers but I am not technically able to implement the first and the second seems to be related to different providers, which is not what we need.

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