Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Taking your approach on designing things actually makes it fun, more natural, and overall easier.

— Dominik, Developer

OAuth Tag

If you're using OAuth to manage user authentication, you may find you need to generate login URLs at some point. Here's how you do it.


Here's the regular/parameter syntax in action, especially useful if the provider name comes from variable.

<a href="{{ oauth provider="github" }}">Sign In with Github</a>
<a href="/oauth/github">Sign In with Github</a>

And the shorthand version.

<a href="{{ oauth:github }}">Sign In with Github</a>
<a href="/oauth/github">Sign In with Github</a>

And now with a redirect:

<a href="{{ oauth:github redirect="/account" }}">Sign In with Github</a>
<a href="/oauth/github?redirect=/account">Sign In with Github</a>




The provider to be used. You may either specify as a parameter or as a tagpart for shorthand: {{ oauth provider="github" }} or {{ oauth:github }}



The URL to be taken to after authenticating. This will be appending onto the generated URL as a query parameter.

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →