omniauth-google logout does not work


omniauth-google logout does not work



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.


omniauth-google-oauth2



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"}





"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 3 at 7:32





So how I can login with another google account? Any hints?
– makeapp
Jul 3 at 18:26





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 3 at 18:28









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

api-platform.com Unable to generate an IRI for the item of type

How to set up datasource with Spring for HikariCP?

Display dokan vendor name on Woocommerce single product pages