Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/send/backend/src/routes/oidc-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const router: Router = Router();
* Endpoint for handling OIDC authentication after the frontend completes the OAuth flow
* The frontend should call this endpoint with the access token received from OIDC
*/
router.get(
router.post(
'/oidc/authenticate',
requireOIDCAuth,
addErrorHandling(AUTH_ERRORS.AUTH_FAILED),
Expand All @@ -34,7 +34,6 @@ router.get(
error: 'missing_oidc_user',
});
}

const { sub, email, username } = req.oidcUser;

try {
Expand Down
8 changes: 1 addition & 7 deletions packages/send/frontend/src/stores/auth-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,7 @@ export const useAuthStore = defineStore('auth', () => {
);

// Send the access token to our backend to create/update user
const response = await api.call('auth/oidc/authenticate', {
method: 'POST',
headers: {
Authorization: `Bearer ${user.access_token}`,
'Content-Type': 'application/json',
},
});
const response = await api.call('auth/oidc/authenticate', {}, 'POST');

if (response?.user) {
isLoggedIn.value = true;
Expand Down
Loading