Hi, Individual users and members of organisation both access my application. I want to include organisation prompt link in default auth0 login page. is it possible or any work around ?
I actually just reached out to Auth0 support a few days asking this. Unfortunately, itās not possible.
If you set the option to āBothā, you must programmatically pass the organization ID in the request to the /authorize
endpoint. The only way to show the organization prompt to an end user is to select the āTeam members of organizationsā option, but obviously that wonāt work for your use case (it prevents people from not being part of an org or things like self-service signup).
I have the same use case. Iād be ok with separate login buttons for individuals and org-members. For the latter, would the expected workaround be to build a form to capture the organization name and then lookup the organizationId by name via /api/v2/organizations/name/{name}
and if success redirect to /api/auth/login?organization={id}
(Iām using nextjs-auth0)?
Also, can someone confirm that I need to create a separate machine-to-machine auth0 app in order for my Next.js server-side to access the Management API, given that an organization-enabled app can not use client credentials to access the Management API?
Has there been a resolution to this issue? I keep getting āparameter organization is required for this clientā even though I pass organization param to login.
@ivo for I couldnāt get it to work through the login URL but I could pass the org_id through the handleLogin function. I am using the npm package so my [ā¦auth].ts looks like this:
import { handleAuth, handleLogin } from '@auth0/nextjs-auth0';
export default handleAuth({
async login(req: NextApiRequest, res: NextApiResponse) {
await handleLogin(req, res, {
authorizationParams: {
organization: orgId,
},
});
},
});
Unfortunately, itās not possible . If you set the option to āBothā, you must programmatically pass the organization ID in the request to the /authorize endpoint
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.