adonisjs / ally

AdonisJS Social Authentication Provider
MIT License
158 stars 54 forks source link

How to change social login clientid dynamically? #124

Closed ibalaji777 closed 3 years ago

ibalaji777 commented 3 years ago

I am moving laravel to adonis js

I am using laravel socialite buildprovider to make social login there I can change client id dynamically but

Adonis js using ally.ts file to store client id, client secrete key and other parameters I want to change In dynamically in controller or router without store.

ibalaji777 commented 3 years ago

awesome library i loved this thanks for whole team made this ally['manager']['config']['google']['clientId']="clientid";

Route.get('/google/redirect', async ({ ally }) => {

  //google driver
 ally['manager']['config']['google']['clientId']="-.apps.googleusercontent.com";
 ally['manager']['config']['google']['clientSecret']="soUJ8d27hSiz3Fmz4";
 ally['manager']['config']['google']['callbackUrl']="http://localhost:8000/api/login/google/callback";
 //
  // return ally;
  return ally.use('google').redirect()
})