# URL OAuth separada para cadastro vs login

**URL:** https://meta.discourse.org/t/separate-oauth-url-for-signup-vs-login/89845
**Category:** Support
**Created:** [Junho 14, 2018, 6:05am UTC](https://meta.discourse.org/t/separate-oauth-url-for-signup-vs-login/89845 "2018-06-14T06:05:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sooper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sooper/32/119856_2.png) [@sooper](https://meta.discourse.org/u/sooper)
#### Post date: [Junho 14, 2018, 6:05am UTC](https://meta.discourse.org/t/separate-oauth-url-for-signup-vs-login/89845/1 "2018-06-14T06:05:36Z")

</div>

Is it possible, using the oauth basic plugin to define a separate OAuth URL for the signup button versus the login button? Alternatively … is it possible to externally calculate the signup state code (or retrieve via the API) ?

The use case is… I would like to be able to externally send an invite email with properly formatted url to the Oauth provider bringing the user directly to the Oauth signup page rather than making the user choose login, and then look for the “create new account” link on the oauth page.

If I try it just using the oauth signup url, a user can create a new account on the Oauth signup page, they are re-directed to the Discourse account creation page, and then presented with the error message:

“Sorry, there was an error authorizing your account. Perhaps you did not approve authorization?”

I’m assuming it’s because I don’t know the “state” parameter for the URL because one hasn’t been generated.

Ideas?

---

<div class="post-metadata">

### Author: ![DaveEveritt](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@DaveEveritt](https://meta.discourse.org/u/DaveEveritt)
#### Post date: [Setembro 20, 2019, 5:10pm UTC](https://meta.discourse.org/t/separate-oauth-url-for-signup-vs-login/89845/2 "2019-09-20T17:10:24Z")

</div>

Tenho uma pergunta semelhante, ou seja, a necessidade de direcionar novos usuários do fórum para uma URL de cadastro…

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [Maio 8, 2023, 1:14am UTC](https://meta.discourse.org/t/separate-oauth-url-for-signup-vs-login/89845/3 "2023-05-08T01:14:28Z")

</div>



---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [Maio 8, 2023, 1:19am UTC](https://meta.discourse.org/t/separate-oauth-url-for-signup-vs-login/89845/4 "2023-05-08T01:19:19Z")

</div>


