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

Facing Issue while Use getAccessTokenSilently #780

Open
6 tasks done
parth25 opened this issue Jun 26, 2024 · 0 comments
Open
6 tasks done

Facing Issue while Use getAccessTokenSilently #780

parth25 opened this issue Jun 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@parth25
Copy link

parth25 commented Jun 26, 2024

Checklist

Description

I am facing an issue while calling the getAccessTokenSilently method. The token is generated successfully, but the process does not move to the next step. Here is my code for your reference. If I remove this method, it works, but I need a new token to update my data. This issue only occurs when running the build version; it works correctly on my localhost.

const companyFormSubmit = (companyFormData: any) => {
    dispatch(
      companyRegisterPost({
        backendApi: backendApi,
        languageCode: i18n.language,
        name: companyFormData.companyName,
        billingAddress: companyFormData.billingAddress,
        city: companyFormData.companyCity,
        postalCode: companyFormData.companyZipcode,
        state: companyFormData.companyState,
        taxNumber: companyFormData.taxNumber,
        faviconIcon: companyFormData.logo,
        portalCountries: [companyFormData.selectedCompanyCountries]
      })
    ).then(async (response: any) => {
      if (response.meta.requestStatus === 'fulfilled') {
        await auth.getAccessTokenSilently({ cacheMode: 'off' }) // new token get
        props.setActiveStep(props.activeStep + 1)
      }
    })
  }

Reproduction

Step 1 : Register Custom Page

Additional context

No response

auth0-react version

2.2.4

React version

18.2.0

Which browsers have you tested in?

Chrome

@parth25 parth25 added the bug Something isn't working label Jun 26, 2024
@parth25 parth25 changed the title Facing Issue while getAccessTokenSilently Facing Issue while Use getAccessTokenSilently Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant