<@U04UQ68083H> can i directly start an oauth flow ...
# ory-copilot
f
@chilly-king-10285 can i directly start an oauth flow with registration?
c
A message from kapa.ai
Yes, you can directly start an OAuth2 flow with registration by using the
prompt=registration
parameter in your authorization request. This instructs the Authorization Server (Ory Hydra or Ory Network) to display the registration UI instead of the login UI. The exact URL is governed by the
urls.registration
config value (by default,
/ui/registration
) [OAuth2 authorization code flow](https://www.ory.sh/docs/oauth2-oidc/authorization-code-flow). Here’s how it works: - When you initiate the OAuth2 Authorization Code flow, include
prompt=registration
in your request to the authorization endpoint. - The user will be redirected to the registration screen, allowing them to create a new account as part of the OAuth2 flow. Example authorization request:
Copy code
GET /oauth2/auth?   response_type=code   &client_id=your-client-id   &redirect_uri=<https://your-app/callback>   &scope=openid   &state=random-state   &prompt=registration
This is supported by Ory’s OAuth2 and OpenID Connect implementation, and is documented as the recommended way to start the flow with registration [OAuth2 authorization code flow](https://www.ory.sh/docs/oauth2-oidc/authorization-code-flow). Note: The actual user experience and flow completion may depend on your client and server configuration, and there are some edge cases and open issues (e.g., with SPA flows or skip consent) discussed in the Ory community [OAuth2 Clients with the "skip consent" flag fail to execute
prompt=none
flows](https://github.com/ory/network/issues/317). But the core functionality—starting an OAuth2 flow with registration—is supported.