Keycloak OIDC - #1112
Conversation
| const query = `${QUERY_API}/v2/organizations`; // default for testing | ||
| // const query = `${QUERY_API}/v2/organizations?ids=${JSON.stringify( | ||
| // session.user.organization_id | ||
| // )}`; |
There was a problem hiding this comment.
The next step will be to update the microservices to take queries with auth
There was a problem hiding this comment.
This is fine, actually, the microservices themselves don't support auth so we can do nothing on the client side for now
| const query = `${QUERY_API}/v2/organizations`; // default for testing | ||
| // const query = `${QUERY_API}/v2/organizations?ids=${JSON.stringify( | ||
| // session.user.organization_id | ||
| // )}`; |
There was a problem hiding this comment.
This is fine, actually, the microservices themselves don't support auth so we can do nothing on the client side for now
| loadOrganizations(); | ||
| } | ||
| setUserHasOrg(!!user?.policy?.organization?.id); | ||
| setUserHasOrg(!!user?.organization_id.length); |
There was a problem hiding this comment.
@gwynndp can you return organization id from keycloak now?
There was a problem hiding this comment.
Yes, though I had to choose to return an array of all the organization ids related to the group or just the id that the user is manually assigned in keycloak.
The admin panel needs to receive all the ids the way it's currently implemented so I chose to return the array.
In future we may want to return either both or just the organization id, but if we do that we'll have to handle identifying sub-organizations from the group for every api-request on the backend.
Description
Start replacing custom auth code with keycloak-oidc implementation
Issue(s) addressed
What kind of change(s) does this PR introduce?
Please check if the PR fulfils these requirements
Breaking change
Does this PR introduce a breaking change? NO