Forgot password when user is invited to another organization


I have just noticed that when we invite already registered user to another organization and when the user tries to use “Forgot password” functionality it simply doesn’t work. Meaning the email is not sent and there is an error in logs:
User does not exist or user is not part of organization

Which is kind of clear, because there is an orgId in URL. Do you have any solution how to mitigate that?

1 Like

Hi @robMindfuel

I’m having trouble understanding what you are asking here. Do you have some more information, maybe an example, that could help illustrate the problem you are facing?

@dan.woda Sure. Let me briefly explain the situation step by step:

  1. Let’s have a USER that belongs to Organization A
  2. The USER is being invited to Organization B
  3. USER receives the invitation
  4. USER tries to reset the password using an invitation link to Organization B

It ends up with an error in logs: User does not exist or user is not part of organization

1 Like

I was experiencing something similar. It turned out that Auth0 was sending me an invitation and organization in URL search params and I wasn’t passing them back.

The app in question was using auth0-react, so the relevant code is

const Auth0Wrapper = ({ children }) => {
  const options = {
    domain: 'my.domain',
    clientId: '',
    audience: 'my-audience',

  // Copy invitation and organization from URL to send back:
  const params = new URL(document.location.href).searchParams
  if (params.has('invitation')) { options.invitation = params.get('invitation') }
  if (params.has('organization')) { options.invitation = params.get('organization') }

  return (
    <Auth0Provider {...options}>{children}</Auth0Provider>
1 Like

Thanks for the help @jrosen-cc!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.