Reputation: 906
I created a G+ login credential to my application through 0auth2.
'google' => [
'class' => 'yii\authclient\clients\GoogleOAuth',
'clientId' => '*****************',
'clientSecret' => 'j*************',
],
The above code is from my config/web.php. and this is my action in controller
'auth' => [
'class' =>'yii\authclient\AuthAction',
'successCallback' => [
$this, 'successCallback'
],
every thing is fine..but got some error while returning back.
The error is
Error: redirect_uri_mismatchThe redirect URI in the request: http://localhost/mysite/site/auth?authclient=google did not match a registered redirect URI.
Can any one tell me why this happening and what I am missing...
Thank you.
Upvotes: 1
Views: 552
Reputation: 3079
You can also add returnUrl
explicitly in your auth client configuration. Look at docs for more info.
Upvotes: 1