0

I am using omniauth-google-oauth2 to build login and logout. When i click login for first time, i get redirected to accounts.google.com and login. When I click logout and login again, it automatically logs me in without asking for account and password.

For logout, I already destroyed the session and set cookies. What else should I do to implement the feature of manually login after logout?

Console output:

#<OmniAuth::AuthHash credentials=#<OmniAuth::AuthHash expires=true expires_at=1530593556 token="ya29.Glxxxxxx39-nW"> extra=#<OmniAuth::AuthHash id_info=#<OmniAuth::AuthHash at_hash="9LNQNsk6dez9g" aud="741325071dgbmec6sj969ajh.apps.googleusercontent.com"...
Processing by AuthController#google_callback as HTML
Parameters: {"state"=>"a69a53ebdaa9ce3b5b6082d8a17b50eafa4", "code"=>"4/AACDlTY37f_Rm6UJxfUPJezvalNVrfX5iSdsX1AnPDGna9gVLlwlLQHXJqjgJL9Xv0"}
Jagdeep Singh
  • 4,880
  • 2
  • 17
  • 22
makeapp
  • 181
  • 3
  • 11
  • 1
    _"When I click logout and login again, it automatically login without manually typing the password and account."_ - Your logout works just fine (as it looks to me from what you said). You are not asked to enter account credentials for second login because you are already logged in to google in your browser. When you logged out from your application, it did not log you out from google, but only from your application. – Jagdeep Singh Jul 03 '18 at 07:32
  • So how I can login with another google account? Any hints? – makeapp Jul 03 '18 at 18:26
  • 1
    Haven't tried that. But may be, login to another google account in a separate tab and then, when you login from your application next time, it might ask for what account to use to login. – Jagdeep Singh Jul 03 '18 at 18:28

0 Answers0