# How to select a different email address if user declines "Authorize App" step during sign-up? @auth0/nextjs-auth0?

**URL:** <https://community.auth0.com/t/how-to-select-a-different-email-address-if-user-declines-authorize-app-step-during-sign-up-auth0-nextjs-auth0/86760>\
**Category:** Get Help\
**Tags:** api, login, auth0\
**Created:** [July 11, 2022, 4:49pm UTC](https://community.auth0.com/t/how-to-select-a-different-email-address-if-user-declines-authorize-app-step-during-sign-up-auth0-nextjs-auth0/86760 "2022-07-11T16:49:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mishchief](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mishchief/32/38673_2.png) [@mishchief](https://community.auth0.com/u/mishchief)\
**Post date:** [July 11, 2022, 4:49pm UTC](https://community.auth0.com/t/how-to-select-a-different-email-address-if-user-declines-authorize-app-step-during-sign-up-auth0-nextjs-auth0/86760/1 "2022-07-11T16:49:48Z")

</div>

I’m using @auth0/nextjs-auth0 library for this implementation.

While testing auth0 login for the first time, I entered an email address, then got prompted to “Authorize App” “Default app is requesting access to your … account”

I then decided that because I chose the wrong email address, I needed to go change it so I clicked “Decline”.

Now there doesn’t seem to be a way to enter a different email address. When I click the Login button again it doesn’t offer a way to register with a different address. Normally, I’d expect to see a “Not [foo@bar.com](mailto:foo@bar.com)? Use a different account” link. Or just send me back to the login screen.

Is there a way around this? Is it possible to set it so that any time a user click on the “Login” button they are allowed to log in again, and override whatever was there before?

Thanks!

---

<div class="post-metadata">

**Author:** ![pomubry](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pomubry/32/33873_2.png) [@pomubry](https://community.auth0.com/u/pomubry)\
**Post date:** [July 12, 2022, 11:22am UTC](https://community.auth0.com/t/how-to-select-a-different-email-address-if-user-declines-authorize-app-step-during-sign-up-auth0-nextjs-auth0/86760/2 "2022-07-12T11:22:07Z")

</div>

From what I understand, Auth0 stores in a cookie your previous login credentials in `AUTH0_ISSUER_BASE_URL` without cleaning it when the user declined authorization. You can see this when you check the cookies during the login screen. This is how I resolved mine. Take note of your .env variables.

```auto
// pages/api/auth/[...auth0].js
import { handleAuth, handleCallback } from "@auth0/nextjs-auth0";

const authOptions = {
  async callback(req, res) {
    try {
      await handleCallback(req, res);
    } catch (error) {
      console.error("Status:", error.status, "-", error.message);
      res
        .redirect(
          `${process.env.AUTH0_ISSUER_BASE_URL}/v2/logout?${new URLSearchParams(
            {
              client_id: process.env.AUTH0_CLIENT_ID,
              returnTo: process.env.AUTH0_BASE_URL,
            }
          )}`
        )
        .end();
    }
  },
};

export default handleAuth(authOptions);

```

relevant: [Logout handler does not call the auth0 logout endpoint if the user is unauthorized · Issue #362 · auth0/nextjs-auth0 · GitHub](https://github.com/auth0/nextjs-auth0/issues/362#issuecomment-860711901)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 26, 2024, 11:56pm UTC](https://community.auth0.com/t/how-to-select-a-different-email-address-if-user-declines-authorize-app-step-during-sign-up-auth0-nextjs-auth0/86760/3 "2024-11-26T23:56:41Z")

</div>

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