# #123 omniauth with multiple providers

- URL: https://superails.com/posts/rails-7-123-omniauth-with-multiple-providers
- Published: 2023-04-11
- Duration: 05:36
- Access: free
- Topics: omniauth, oauth2

Most often you would like to enable more than one oAuth provider for your app. In this episode I will show a resuable approach to enabling multiple oAuth providers.

In this episode we will add a second oAuth provider to an existing Rails app, and allow users to authenticate via both omniauth strategies.

Episode source code: https://github.com/corsego/123-multiple-oauth-providers/commit/253f5e6a0e69f84a528ef0d0fb78eebf83b6884d

0:00 first oAuth provider - microsoft azure
0:46 install second oAuth provider - github
3:16 authenticate method in omniauth callbacks controller
3:55 Dynamic oauth provider authentication handling

## Chapters

- 0:00 first oAuth provider - microsoft azure
- 0:46 install second oAuth provider - github
- 3:16 authenticate method in omniauth callbacks controller
- 3:55 Dynamic oauth provider authentication handling
