Description:
I'm using the AXA OIDC React library for authentication in my application, and I need to implement functionality to check if the authenticated user exists on my resource server (API). If the user does not exist, I need to create a new user record on the resource server.
I'm not sure at which point in the authentication flow or which part of the library I should be implementing this functionality. Can someone point me in the right direction or provide guidance on where in the library's lifecycle I should be checking and creating the user on the resource server? I tried implementing this in the callbackSuccessComponent but the /api/me endpoint keeps getting a 401 because the bearer token is not set yet with useOidcFetch();
Additional Information:
I'm using the latest version of the AXA OIDC React library
My resource server is a springboot application.
I'm planning to use the access token obtained from the library to make requests to the resource server.
Also using react query
Any advice or documentation references would be greatly appreciated.
Issue and Steps to Reproduce
Description: I'm using the AXA OIDC React library for authentication in my application, and I need to implement functionality to check if the authenticated user exists on my resource server (API). If the user does not exist, I need to create a new user record on the resource server.
I'm not sure at which point in the authentication flow or which part of the library I should be implementing this functionality. Can someone point me in the right direction or provide guidance on where in the library's lifecycle I should be checking and creating the user on the resource server? I tried implementing this in the callbackSuccessComponent but the /api/me endpoint keeps getting a 401 because the bearer token is not set yet with useOidcFetch();
Additional Information:
Any advice or documentation references would be greatly appreciated.
Versions
Screenshots
Expected
Actual
Additional Details