Legacy Dev Forum Posts

 View Only

Sign Up

Working with multiple environment

  • 1.  Working with multiple environment

    Posted 06-05-2025 18:07

    yraf10 | 2024-05-22 10:00:38 UTC | #1

    Hello , i have a bouton in my react app with .NetCore Backend that used to change environment from dev to preprod . the problem is that always redirect me to the environment that genesys user is connected in my browser .

    for exemple if i'm connected to genesys cloud in Edge browser with the organisation of Preprod and i open my reactApp in dev organisation . it will open by default the prepord organisation in my react app.

    here is the code :if (err.response?.status === 401) { const codeverifier = createCodeVerifier(x); const expires = new Date() expires.setTime(expires.getTime() + (Y)) setCookie('codeverifier', code_verifier);

    createCodeChallenge(codeverifier)?.then((codechallenge: any) => { const genesysCloudLoginUri = https://login.${environment}/oauth/authorize? + org=${org}&response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&code_challenge=${code_challenge}&code_challenge_method=S256; window.location.href = genesysCloudLoginUri; })


    system | 2024-06-22 10:01:00 UTC | #2

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


    This post was migrated from the old Developer Forum.

    ref: 26408