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: {
26
26
```
27
27
28
28
``` js
29
- this .$auth .loginWith (' social' )
29
+ this .$auth .loginWith (' social' , options )
30
30
```
31
31
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
+
32
40
### ` authorization_endpoint `
33
41
34
42
** 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 {
63
63
return this . $auth . reset ( )
64
64
}
65
65
66
- login ( ) {
66
+ login ( { params } = { } ) {
67
67
const opts = {
68
68
protocol : 'oauth2' ,
69
69
response_type : this . options . response_type ,
@@ -73,6 +73,7 @@ export default class Oauth2Scheme {
73
73
// Note: The primary reason for using the state parameter is to mitigate CSRF attacks.
74
74
// @see : https://auth0.com/docs/protocols/oauth2/oauth-state
75
75
state : this . options . state || randomString ( ) ,
76
+ ...params ,
76
77
} ;
77
78
78
79
if ( this . options . audience ) {
You can’t perform that action at this time.
0 commit comments