packages feed

hoauth2-2.0.0: example/templates/index.mustache

<html>
    <head>
        <link href="/main.css" rel="stylesheet"/>
    </head>
    <body>
        <h1>Hello OAuth2</h1>
        {{#idps}}
        <section class="login-with">

            {{^isLogin}}
            <a href="{{codeFlowUri}}">Sign in with {{name}}</a>
            {{/isLogin}}

            {{#isLogin}}
            <h2>Welcome to {{name}}</h2>
            {{#user}}
            <div class="result">Hello, {{name}}</div>
            {{/user}}
            <a href="/logout?idp={{name}}">Logout</a>
            <a href="/refresh?idp={{name}}">Refresh</a>
            {{/isLogin}}

        </section>
        {{/idps}}
        <h2>Notes</h2>
        <ol>
            <li>for StackExchange, the callback domain is localhost, have manually add port 9988.</li>
            <li>for Slack, the callback url has to be https and without any port hence need manual intervention. (TODO: add tls to the server)</li>
        </ol>
        </p>
    </body>
</html>