vue-hellojs icon indicating copy to clipboard operation
vue-hellojs copied to clipboard

Support for VUE 3?

Open martabelfm opened this issue 4 years ago • 2 comments

Hi, I see last activity 4 years ago. Are you planning to support VUE 3 as well?

martabelfm avatar Sep 21 '21 13:09 martabelfm

I could contribute one, on the condition the author is in a position to review accept PRs.

Myself I haven't used this project in a while and only came back to it due to one of my customer's projects being resurrected, after being mothballed for 2-3 years.

For a separate project I worked on I used vue-authenticate, which I needed to fork. Maybe the way to go:

https://github.com/ajmas/vue-authenticate-2

ajmas avatar Oct 17 '22 20:10 ajmas

Upon further inspection of the source code, there really isn't much in terms of useful logic.

I simply ended up using the app.config.globalProperties to assign hellojs to the vue global context:

import HelloJs from 'hellojs' // using hellojs@next

// put your app keys here
const config = {
  oauth: {
    google: '',
    facebook: '',
    twitter: ''
};

HelloJs.init(config, {
  redirect_uri: '/auth/redirect',
  // Use you own instance of the proxy
  oauth_proxy: oauthAuthProxy,
  include_email: true
});

// This is really the key part
app.config.globalProperties.hello = HelloJs;

ajmas avatar Oct 18 '22 23:10 ajmas