Skip to content

Commit f8254df

Browse files
committed
fix: update state parameter in OAuth2 redirect URL to include a UUID prefix
1 parent dff84f1 commit f8254df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ui/src/views/chat/user-login/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ function redirectAuth(authType: string, needMessage: boolean = false) {
334334
url += `&state=${config.state}`
335335
}
336336
} else if (authType === 'OAuth2') {
337-
url = `${config.authEndpoint}?client_id=${config.clientId}&response_type=code&redirect_uri=${redirectUrl}&state=${accessToken}`
337+
url = `${config.authEndpoint}?client_id=${config.clientId}&response_type=code&redirect_uri=${redirectUrl}&state=${uuidv4()}_${accessToken}`
338338
if (config.scope) {
339339
url += `&scope=${config.scope}`
340340
}

0 commit comments

Comments
 (0)