File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export default class GoTrueApi {
67
67
options : {
68
68
redirectTo ?: string
69
69
scopes ?: string
70
- queryParams ?: Record < string , string >
70
+ queryParams ?: { [ key : string ] : string }
71
71
}
72
72
) {
73
73
const urlParams : string [ ] = [ `provider=${ encodeURIComponent ( provider ) } ` ]
@@ -78,9 +78,8 @@ export default class GoTrueApi {
78
78
urlParams . push ( `scopes=${ encodeURIComponent ( options . scopes ) } ` )
79
79
}
80
80
if ( options ?. queryParams ) {
81
- for ( const [ param , value ] of Object . entries ( options . queryParams ) ) {
82
- urlParams . push ( `${ encodeURIComponent ( param ) } =${ encodeURIComponent ( value ) } ` )
83
- }
81
+ const query = new URLSearchParams ( options . queryParams )
82
+ urlParams . push ( `${ query } ` )
84
83
}
85
84
return `${ this . url } /authorize?${ urlParams . join ( '&' ) } `
86
85
}
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ export default class GoTrueClient {
194
194
shouldCreateUser ?: boolean
195
195
scopes ?: string
196
196
captchaToken ?: string
197
- queryParams ?: Record < string , string >
197
+ queryParams ?: { [ key : string ] : string }
198
198
} = { }
199
199
) : Promise < {
200
200
session : Session | null
@@ -552,7 +552,7 @@ export default class GoTrueClient {
552
552
options : {
553
553
redirectTo ?: string
554
554
scopes ?: string
555
- queryParams ?: Record < string , string >
555
+ queryParams ?: { [ key : string ] : string }
556
556
} = { }
557
557
) {
558
558
const url : string = this . api . getUrlForProvider ( provider , {
You can’t perform that action at this time.
0 commit comments