问题
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