Skip to content

Commit

Permalink
feat(oidclogin): add redirection uri to oidc login request
Browse files Browse the repository at this point in the history
  • Loading branch information
pl-buiquang committed Jul 24, 2024
1 parent decf61c commit 18f047c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/services/aphp/servicePractitioner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import apiBackend from 'services/apiBackend'
import { REFRESH_TOKEN } from '../../constants'
import { OIDC_REDIRECT_URI, REFRESH_TOKEN } from '../../constants'
import { Authentication, MaintenanceInfo } from 'types'
import { AxiosError, AxiosResponse } from 'axios'

Expand Down Expand Up @@ -47,7 +47,10 @@ const servicePractitioner: IServicePractitioner = {

authenticateWithCode: async (authCode: string): Promise<AxiosResponse<Authentication> | AxiosError> => {
try {
return await apiBackend.post<Authentication>(`/auth/oidc/login`, { auth_code: authCode })
return await apiBackend.post<Authentication>(`/auth/oidc/login`, {
auth_code: authCode,
redirect_uri: OIDC_REDIRECT_URI
})
} catch (error) {
console.error('Error authenticating with an authorization code', error)
return error as AxiosError
Expand Down

0 comments on commit 18f047c

Please sign in to comment.