Skip to content

Commit ade676f

Browse files
committed
fix: remove access_token & id_token from query string
1 parent ef2a590 commit ade676f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/src/Root.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export default function Root({
5959
useEffect(() => {
6060
if (token) {
6161
let redirectURL = config.redirectURL || '/app';
62-
let params = `access_token=${token.access_token}&id_token=${token.id_token}&expires_in=${token.expires_in}&state=${globalState.state}`;
62+
// let params = `access_token=${token.access_token}&id_token=${token.id_token}&expires_in=${token.expires_in}&state=${globalState.state}`;
63+
// Note: If OIDC breaks in the future, use the above params
64+
let params = `state=${globalState.state}`;
6365

6466
if (code !== '') {
6567
params += `&code=${code}`;

server/handlers/oauth_callback.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"fmt"
88
"io"
99
"net/http"
10-
"strconv"
1110
"strings"
1211
"time"
1312

@@ -248,8 +247,9 @@ func OAuthCallbackHandler() gin.HandlerFunc {
248247
expiresIn = 1
249248
}
250249

251-
params := "access_token=" + authToken.AccessToken.Token + "&token_type=bearer&expires_in=" + strconv.FormatInt(expiresIn, 10) + "&state=" + stateValue + "&id_token=" + authToken.IDToken.Token + "&nonce=" + nonce
252-
250+
// params := "access_token=" + authToken.AccessToken.Token + "&token_type=bearer&expires_in=" + strconv.FormatInt(expiresIn, 10) + "&state=" + stateValue + "&id_token=" + authToken.IDToken.Token + "&nonce=" + nonce
251+
// Note: If OIDC breaks in the future, use the above params
252+
params := "state=" + stateValue + "&nonce=" + nonce
253253
if code != "" {
254254
params += "&code=" + code
255255
}

0 commit comments

Comments
 (0)