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 {
153153
154154const orgOptions = ref <qrOption []>([])
155155
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+
156164function redirectAuth(authType : string ) {
157165 if (authType === ' LDAP' || authType === ' ' ) {
158166 return
@@ -191,7 +199,7 @@ function redirectAuth(authType: string) {
191199 if (authType === ' OAuth2' ) {
192200 url =
193201 ` ${config .authEndpoint }?client_id=${config .clientId }&response_type=code ` +
194- ` &redirect_uri=${redirectUrl }&state=${res . data . id } `
202+ ` &redirect_uri=${redirectUrl }&state=${uuidv4 () } `
195203 if (config .scope ) {
196204 url += ` &scope=${config .scope } `
197205 }
You can’t perform that action at this time.
0 commit comments