Browse Source

Merge pull request #3945 from nocodb/fix/google-auth-signin

pull/3965/head
Braks 2 years ago committed by GitHub
parent
commit
bfb30857fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      packages/nc-gui/lang/en.json
  2. 14
      packages/nc-gui/pages/signin.vue
  3. 4
      packages/nc-gui/pages/signup/[[token]].vue

1
packages/nc-gui/lang/en.json

@ -292,6 +292,7 @@
"documentation": "Documentation",
"subscribeNewsletter": "Subscribe to our weekly newsletter",
"signUpWithGoogle": "Sign up with Google",
"signInWithGoogle": "Sign in with Google",
"agreeToTos": "By signing up, you agree to the Terms of Service",
"welcomeToNc": "Welcome to NocoDB!"
},

14
packages/nc-gui/pages/signin.vue

@ -7,7 +7,7 @@ definePageMeta({
title: 'title.headLogin',
})
const { signIn: _signIn } = useGlobal()
const { signIn: _signIn, appInfo } = useGlobal()
const { api, isLoading, error } = useApi({ useGlobalInstance: true })
@ -119,6 +119,18 @@ function resetError() {
</span>
</button>
<a
v-if="appInfo.googleAuthEnabled"
:href="`${appInfo.ncSiteUrl}/auth/google`"
class="scaling-btn bg-opacity-100 after:(!bg-white) !text-primary !no-underline"
>
<span class="flex items-center gap-2">
<LogosGoogleGmail />
{{ $t('labels.signInWithGoogle') }}
</span>
</a>
<div class="text-end prose-sm">
{{ $t('msg.info.signUp.dontHaveAccount') }}
<nuxt-link to="/signup">{{ $t('general.signUp') }}</nuxt-link>

4
packages/nc-gui/pages/signup/[[token]].vue

@ -132,13 +132,13 @@ function resetError() {
<a
v-if="appInfo.googleAuthEnabled"
:href="`${api.instance.defaults.baseURL}/auth/google`"
:href="`${appInfo.ncSiteUrl}/auth/google`"
class="scaling-btn bg-opacity-100 after:(!bg-white) !text-primary !no-underline"
>
<span class="flex items-center gap-2">
<LogosGoogleGmail />
Sign up with Google
{{ $t('labels.signUpWithGoogle') }}
</span>
</a>

Loading…
Cancel
Save