app/controllers/teachers/omniauth_callbacks_controller.rb
# You should also create an action method in this controller like this:
You should also create an action method in this controller like this.
You should also create an action method in this controller like this .
def complete_github(user, type_hash, registration_path)
    if user.persisted? || user.save
      sign_in(type_hash, user)
      set_flash_message(:notice, :success, :kind => "Github") if is_navigational_format?
    else
      session["devise.github_data"] = request.env["omniauth.auth"]
      redirect_to registration_path
    end
  end
def complete_github ( user , type_hash , registration_path ) if user . persisted? || user . save sign_in ( type_hash , user ) set_flash_message ( :notice , :success , :kind => "Github" ) if is_navigational_format? else session [ "devise.github_data" ] = request . env [ "omniauth.auth" ] redirect_to registration_path end end
You should also create an action method in this controller like this:
You should also create an action method in this controller like this :
#, event: :authentication #this will throw if @user is not activated
user
<not_specific>
type_hash
<not_specific>
registration_path
<not_specific>