Skip to content

Commit

Permalink
oauth callbacks sign in
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Aug 17, 2023
1 parent 6df735e commit 7ac0900
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions app/controllers/users/omniauth_callbacks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ def callback_handler

if user.present?
flash.now[:notice] = "We are synchronizing your #{provider} data, it may take a while"
# sign_in_and_redirect(user, :event => :authentication)
redirect_to user_setting_path(user.username, :integrations)
redirect_to user_setting_path(user.username, :integrations) if user_signed_in?
unless user_signed_in?
sign_in(:user, user)
redirect_to root_url and return
end

else
session['devise.omniauth_data'] = auth.except('extra')
redirect_to(new_user_registration_url)
Expand Down
2 changes: 1 addition & 1 deletion app/views/player/_player.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<%= render "player/track_info", track: track %>
</div>

<%= render "player/sidebar" %>
<% #= render "player/sidebar" %>
Expand Down
6 changes: 3 additions & 3 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ en:
title_email: Change Email
sub_email: Change Email information.
title_security: Security
sub_security: Change your credentials
title_notification: Notifications
sub_notification: Change your notification preferences.
sub_credentials: Change your credentials
title_notifications: Notifications
sub_notifications: Change your notification preferences.
title_integrations: Integrations
sub_integrations: Manage your external integrations.
title_transbank: Transbank settings
Expand Down

0 comments on commit 7ac0900

Please sign in to comment.