feat: Google OAuth for login & signup (#6346)
This PR adds Google OAuth for all existing users, allowing users to log in or sign up via their Google account. --------- Co-authored-by: Pranav Raj S <pranav@chatwoot.com> Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com> Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
co-authored by
Pranav Raj S
Fayaz Ahmed
Sojan
parent
2c8ecbeceb
commit
7be2ef3292
@@ -0,0 +1,5 @@
|
||||
Rails.application.config.middleware.use OmniAuth::Builder do
|
||||
provider :google_oauth2, ENV.fetch('GOOGLE_OAUTH_CLIENT_ID', nil), ENV.fetch('GOOGLE_OAUTH_CLIENT_SECRET', nil), {
|
||||
provider_ignores_state: true
|
||||
}
|
||||
end
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
Rails.application.routes.draw do
|
||||
# AUTH STARTS
|
||||
match 'auth/:provider/callback', to: 'home#callback', via: [:get, :post]
|
||||
mount_devise_token_auth_for 'User', at: 'auth', controllers: {
|
||||
confirmations: 'devise_overrides/confirmations',
|
||||
passwords: 'devise_overrides/passwords',
|
||||
sessions: 'devise_overrides/sessions',
|
||||
token_validations: 'devise_overrides/token_validations'
|
||||
token_validations: 'devise_overrides/token_validations',
|
||||
omniauth_callbacks: 'devise_overrides/omniauth_callbacks'
|
||||
}, via: [:get, :post]
|
||||
|
||||
## renders the frontend paths only if its not an api only server
|
||||
|
||||
@@ -9,6 +9,7 @@ const resolve = {
|
||||
survey: path.resolve('./app/javascript/survey'),
|
||||
assets: path.resolve('./app/javascript/dashboard/assets'),
|
||||
components: path.resolve('./app/javascript/dashboard/components'),
|
||||
helpers: path.resolve('./app/javascript/shared/helpers'),
|
||||
'./iconfont.eot': 'vue-easytable/libs/font/iconfont.eot',
|
||||
'./iconfont.woff': 'vue-easytable/libs/font/iconfont.woff',
|
||||
'./iconfont.ttf': 'vue-easytable/libs/font/iconfont.ttf',
|
||||
|
||||
Reference in New Issue
Block a user