File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,17 @@ auth: {
2626```
2727
2828``` js
29- this .$auth .loginWith (' social' )
29+ this .$auth .loginWith (' social' , options )
3030```
3131
32+ ` options ` is an optional object with ` params ` property defining additional URL parameters to pass to authorization endpoint. For example:
33+
34+ ``` js
35+ this .$auth .loginWith (' social' , { params: { lang: ' en' } })
36+ ```
37+
38+ will add extra query parameter ` &lang=en ` to a URL.
39+
3240### ` authorization_endpoint `
3341
3442** REQUIRED** - Endpoint to start login flow. Depends on oauth service.
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export default class Oauth2Scheme {
6363 return this . $auth . reset ( )
6464 }
6565
66- login ( ) {
66+ login ( { params } = { } ) {
6767 const opts = {
6868 protocol : 'oauth2' ,
6969 response_type : this . options . response_type ,
@@ -73,6 +73,7 @@ export default class Oauth2Scheme {
7373 // Note: The primary reason for using the state parameter is to mitigate CSRF attacks.
7474 // @see : https://auth0.com/docs/protocols/oauth2/oauth-state
7575 state : this . options . state || randomString ( ) ,
76+ ...params ,
7677 } ;
7778
7879 if ( this . options . audience ) {
You can’t perform that action at this time.
0 commit comments