# Auth provider custom URL?

**URL:** https://meta.discourse.org/t/auth-provider-custom-url/43887
**Category:** Development
**Created:** [2016年五月8日 16:58 UTC](https://meta.discourse.org/t/auth-provider-custom-url/43887 "2016-05-08T16:58:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jesselperry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jesselperry/32/119501_2.png) [@jesselperry](https://meta.discourse.org/u/jesselperry)
#### Post date: [2016年五月8日 16:58 UTC](https://meta.discourse.org/t/auth-provider-custom-url/43887/1 "2016-05-08T16:58:59Z")

</div>

Could someone help explain the new feature to allow auth providers to provide a custom URL? I tried to read through the code but didn’t really understand what was happening. Any insight would be great — thanks!

[https://github.com/discourse/discourse/commit/c423ce6333a80304a0aebb1a5a93c1d02770fa17](https://github.com/discourse/discourse/commit/c423ce6333a80304a0aebb1a5a93c1d02770fa17)

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2016年五月8日 18:23 UTC](https://meta.discourse.org/t/auth-provider-custom-url/43887/2 "2016-05-08T18:23:31Z")

</div>

I believe it’s used in the SAML auth provider if that’s any help to you:

> <https://github.com/discourse/discourse-saml/blob/172cc6c3094cf78036a782e6c22da70e5c722f34/plugin.rb#L22>

> <https://github.com/discourse/discourse-saml/blob/172cc6c3094cf78036a782e6c22da70e5c722f34/plugin.rb#L124>

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2016年五月8日 20:23 UTC](https://meta.discourse.org/t/auth-provider-custom-url/43887/3 "2016-05-08T20:23:48Z")

</div>

Should we clarify in the settings copy if this is for saml only @eviltrout?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2016年五月9日 15:10 UTC](https://meta.discourse.org/t/auth-provider-custom-url/43887/4 "2016-05-09T15:10:22Z")

</div>

It’s not a site setting though, that’s an internal field that plugin authors can use to set a custom URL.

As to how to use it, any plugin that creates an `omniauth.provider` can supply a `:custom_url` if they like like in the SAML example above.
