Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Populate UserData #917

Open
Ed-Marcavage opened this issue Oct 20, 2022 · 3 comments
Open

Cannot Populate UserData #917

Ed-Marcavage opened this issue Oct 20, 2022 · 3 comments
Labels

Comments

@Ed-Marcavage
Copy link

I am implementing oidc-react in my typescript react app using the ChakraUI component Lib. I am trying to Auth with Azure AD, it successfully redirects the user back to the web page (hosted locally) after authenticating. However, I cannot get UserData to populate (see screen shot). I have pasted snippets of my implementation below. The goal is to gather user info from the SAML assertion with AzureAD, which I believe should be stored in UserDate?

/src/index.tsx

root.render(
  <React.StrictMode>
    <AuthProvider
    authority="https://login.microsoftonline.com/____________________________"
    clientId="______________________"
    redirectUri="http://localhost:3002"
    loadUserInfo
    >
    <ColorModeScript />
    <ChakraProvider theme={theme}>
      <App />
    </ChakraProvider>
    </AuthProvider>
  </React.StrictMode>
);

simply return useAuth to the console for testing/seeing the UserData values
/src/App.tsx

export const App = () => {
  const auth = useAuth();
  console.log(auth)
....

Screen Shot 2022-10-20 at 11 33 31 AM

@GNUGradyn
Copy link

any update on this? I am having the same issue. Identity provider redirects back to app, but isLoading is true and userData is null

@MaelthiS
Copy link

MaelthiS commented Apr 4, 2023

I have the bug too, please provide a solution

@simenandre
Copy link
Member

Hello, @MaelthiS, @GNUGradyn and @Ed-Marcavage!

Feel free to work on a solution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants