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

Using omniauth to connect to third party oauth2 providers without logging them in with these providers #1040

Open
misner opened this issue Mar 29, 2021 · 2 comments

Comments

@misner
Copy link

misner commented Mar 29, 2021

Using:

  • Ruby 2.6
  • Rails 6.0

I read the Docs notably the articles about "managing multiple providers" but could not find a clear response if omniauth is the right fit for what I need.

I'd like to use omniauth to connect a user (which is already authenticated via our own custom login/password system) to various oauth2 providers. The thing is I don't want to use these oauth2 providers as a way to log them in my app. All the logging is already taken care of and we just want to help them "connect" to their third party apps such as linkedin, twitter...

A good example would be a typical CRM like Hubspot where a visitor creates his account using a typical login/password and then in his Settings he can "sync" his account with linkedin or twitter to unlock certain features (ex multi posting messages to social platforms).

Having read the article about "managing multiple providers", and many articles or Help guide on the web such as https://gorails.com/episodes/login-with-multiple-oauth-providers, and as far as I can understand, all seems to explain how to tackle the issue of how to log in/out/keep consistency when users can log from multiple providers so there seems to be a lot of complications related to enable "logging-in" for many providers.
Hence, I'm not sure if we should use omniauth as for us, we don't want them to be able to actually log-in with multiple providers, just with one (our login/password) but still "sync" their account with other third parties providers.

Could and should I use omniauth ?

@misner misner changed the title Using omniauth to connect to third party oauth2 provicers without logging them in with these providers Using omniauth to connect to third party oauth2 providers without logging them in with these providers Mar 29, 2021
@ryansch
Copy link

ryansch commented Mar 30, 2021

@misner This is exactly how we use omniauth. In fact, we don't use it to log in users at all!

@misner
Copy link
Author

misner commented Mar 30, 2021

@ryansch Great! thanks for the confirmation.

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

2 participants