File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,14 @@ interface qrOption {
153
153
154
154
const orgOptions = ref <qrOption []>([])
155
155
156
+ function uuidv4() {
157
+ return ' xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' .replace (/ [xy] / g , function (c ) {
158
+ const r = (Math .random () * 16 ) | 0
159
+ const v = c === ' x' ? r : (r & 0x3 ) | 0x8
160
+ return v .toString (16 )
161
+ })
162
+ }
163
+
156
164
function redirectAuth(authType : string ) {
157
165
if (authType === ' LDAP' || authType === ' ' ) {
158
166
return
@@ -191,7 +199,7 @@ function redirectAuth(authType: string) {
191
199
if (authType === ' OAuth2' ) {
192
200
url =
193
201
` ${config .authEndpoint }?client_id=${config .clientId }&response_type=code ` +
194
- ` &redirect_uri=${redirectUrl }&state=${res . data . id } `
202
+ ` &redirect_uri=${redirectUrl }&state=${uuidv4 () } `
195
203
if (config .scope ) {
196
204
url += ` &scope=${config .scope } `
197
205
}
You can’t perform that action at this time.
0 commit comments