1/13/2024 0 Comments Rails api tutorial![]() # Example implementation: # User.find_by(id: session) || redirect_to(new_user_session_url) # end # resource_owner_authenticator do # raise "Please configure doorkeeper resource_owner_authenticator block located in #" # Put your resource owner authentication logic here. ![]() # Check the list of supported ORMs here: orm :active_record # This block will be called to check whether the resource owner is authenticated or not. configure do # Change the ORM that doorkeeper will use (requires ORM extensions installed). #config/initializers/doorkeeper.rb Doorkeeper. Open config/initializers/doorkeeper.rb, and edit the following.Ĭomment out or remove the block for resource_owner_authenticator at the top of the file. Next, we will customize the Doorkeeper configuration. Next, run rake db:migrate to add these tables into database. Here’s an example of Github OAuth applications : ![]() If you only need one client (eg: web frontend), it is fine too. For example, we can create three application, one for Android app client, one for iOS app client and one for React frontend, this way we can know which clients the users are using. The OAuth application table is used to keep track of the application we created to use for authentication.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |