Answer the question
In order to leave comments, you need to log in
How to create a multi-step registration using Omniauth?
There was a need to add login/registration via omniauth, but after logging in, the user must complete their profile.
The general scheme is as follows: the user logs in to the site through omniauth > if he enters for the first time, then he is shown a form with additional fields > after filling in the fields, the user presses the registration button and only now a new record is created in the database.
Answer the question
In order to leave comments, you need to log in
You make a request. You receive data.
You check.
If the user appeared for the first time, then you render a form from your action to him, for example:
In this form, he enters more data.
You create action accepting this form and you accept the data. Etc. Render him at least a thousand views.
If he left halfway before he filled in everything he needed, you can hang up a check, for example, in application_controller for the data of the current user and whether everything is filled in or not. Proceeding from logic you render the necessary form.
AND? Where to add fields? There are no fields in Omniauth. Add whatever you want to the user`a model. After authentication through the provider, redirect the user to where you want too
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question