File tree Expand file tree Collapse file tree 1 file changed +13
-20
lines changed
Expand file tree Collapse file tree 1 file changed +13
-20
lines changed Original file line number Diff line number Diff line change 7272GoogleAuth .signIn ();
7373```
7474
75- #### AngularFire2
75+ #### Angular
7676
7777init hook
7878
@@ -101,27 +101,20 @@ async googleSignIn() {
101101
102102#### Vue 3
103103
104- ``` ts
105- // App.vue
106- import { defineComponent , onMounted } from ' vue' ;
107- import { GoogleAuth } from ' @codetrix-studio/capacitor-google-auth' ;
108-
109- export default defineComponent ({
110- setup() {
111- onMounted (() => {
112- GoogleAuth .initialize ();
113- });
104+ ``` vue
105+ <script setup lang="ts">
106+ import { defineComponent, onMounted } from 'vue'
107+ import { GoogleAuth } from '@codetrix-studio/capacitor-google-auth'
114108
115- const logIn = async () => {
116- const response = await GoogleAuth .signIn ();
117- console .log (response );
118- };
109+ onMounted(() => {
110+ GoogleAuth.initialize();
111+ })
119112
120- return {
121- logIn ,
122- } ;
123- },
124- });
113+ async function logIn() {
114+ const response = await GoogleAuth.signIn();
115+ console.log(response) ;
116+ }
117+ </script>
125118```
126119
127120or see more [ CapacitorGoogleAuth-Vue3-example] ( https://github.com/reslear/CapacitorGoogleAuth-Vue3-example )
You can’t perform that action at this time.
0 commit comments