Closed philchass closed 1 year ago
That will be very useful for me also
@philchass @chenlevy
Solution I needed something similiar for my app. I have made few changes so the plugin supports multiple scopes.
How to use it with Vue.js app
in main.js
const gauthOption = {
clientId: 'xxx', // only client id is neede -> you don't set prompt and scopes globally anymore
};
Vue.use(GAuth, gauthOption);
in your components
const googleUser = await this.$gAuth.signIn({
prompt: "select_account",
scope: "profile email", // you can now specify scopes for every gAuth method call
});
const authResponse = googleUser.getAuthResponse();
This plugin does not support the new Google authentication system(GIS). You need to migrate by referring to this document. I'm sorry to tell you this news.
The package can't manage multiples instances of authorization => rights in the same app.
It could be nice to name the variable this.$gauth to manage multiples rights (scopes) when we ask for this.$gAuth.getAuthCode()