How to disable google oauth2 login in the command line

Hi,

i migrated discourse application to other server and i’m getting 400 status code from google auth and can’t login to discourse. Its a problem with oauth2 (i guess) because host name has been changed. How I can disable or overwrite oauth2 settings from command line?

Thanks

Solved! solution:

cd /var/discourse
./launcher enter app
su discourse
psql discourse
update site_settings set value = 'ur-client-id' where id = 15;
update site_settings set value = 'ur-client-secret' where id = 16;
1 Like

Welcome, JW_0! :wave:

You could have done this :slight_smile:

2 Likes

It’s dangerous updating stuff in SQL directly. The Rails way to solve it is something like

./launcher enter app
rails c
SiteSetting.enable_google_oauth2_logins=false
SiteSetting.enable_local_logins=true
exit

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.