Provider for authentication on vk.com using Torii.
npm i torii-vk --save-dev
To use this addon you must create app.
And add clientId
in environment file.
...
ENV['torii'] = {
providers: {
'vk-oauth2': {
clientId: <clientId>
},
'vk-oauth2-bearer': {
clientId: <clientId>
}
}
}
...
Add the action in the route:
...
actions: {
authenticate(provider) {
this.get('torii').open(provider).then(authData => {
//Your code
}, error => {
//Your code
});
}
}
...
In template:
Having trouble? Open an issue!