Skip to content

Commit d56a89e

Browse files
committed
fix: use POST method instead of GET for the '/oauth/callback'
1 parent 355f81a commit d56a89e

File tree

4 files changed

+2786
-80
lines changed

4 files changed

+2786
-80
lines changed

custom/OAuthCallback.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ onMounted(async () => {
4949
const encodedState = encodeURIComponent(state);
5050
const response = await callAdminForthApi({
5151
path: `/oauth/callback?code=${encodedCode}&state=${encodedState}&redirect_uri=${redirectUri}`,
52-
method: 'GET',
52+
method: 'POST',
5353
});
5454
5555
if (response.allowedLogin) {

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default class OAuthPlugin extends AdminForthPlugin {
151151

152152
setupEndpoints(server: IHttpServer) {
153153
server.endpoint({
154-
method: 'GET',
154+
method: 'POST',
155155
path: '/oauth/callback',
156156
noAuth: true,
157157
handler: async ({ query, response, headers, cookies, requestUrl }) => {

0 commit comments

Comments
 (0)