How to authenticate two types of user with same authentication callback in rails?

痴心易碎 提交于 2019-12-11 17:24:32

问题


I want to create a webpage using rails 6.0.0, which has two types of users(model) Admin User/viewer

But the problems is that I want to authenticate (sign up /sign in) for both users with facebook or google_oauth2 with same callbacks address: /auth/:provider/callback

On internet, github and youtube I have found articles and videos only for authenticate single model. But I want to authenticate (sign up /sign in) for two models.

Can anyone help? Please give an idea to authenticate both model with some example that an beginner can understand.

来源:https://stackoverflow.com/questions/58182230/how-to-authenticate-two-types-of-user-with-same-authentication-callback-in-rails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!