open-consul/ui/packages/consul-ui/app/templates/oauth-provider-debug.hbs
John Cowen 569c92c10c
ui: Improve dev-time SSO/OIDC visibility (#11248)
This commit tries to make the development experience of working on our OIDC support a little more realistic, essentially by creating our own OIDC provider in our application (only during development builds). You can still provide a real OIDC provider to work with via our dev time environment/cookie variables as before, just now we default to the behaviour in this commit. Overall this makes it much easier to verify our OIDC support in the UI, and also opens up avenues for us to be able to test more scenarios that we couldn't before (for example not only successful logins, but also erroneous, potentially with multiple error reasons).
2021-10-11 16:03:59 +01:00

39 lines
805 B
Handlebars

<Route
@name={{routeName}}
as |route|>
<div
style="width: 50%;margin: 0 auto;"
>
<h1><route.Title @title="Mock OAuth Provider" /></h1>
<main>
<form
method="GET"
action={{redirect_uri}}
>
{{#let (hash
state="state-123456789/abcdefghijklmnopqrstuvwxyz"
code="code-abcdefghijklmnopqrstuvwxyz/123456789"
) as |item|}}
<TextInput
@name="state"
@label="State"
@item={{item}}
@help="The OIDC state value that will get passed through to Consul"
/>
<TextInput
@name="code"
@label="Code"
@item={{item}}
@help="The OIDC code value that will get passed through to Consul"
/>
{{/let}}
<Action
@type="submit"
>
Login
</Action>
</form>
</main>
</div>
</Route>