Files
node-red-alexa-home-skill-web/views/pages/oauth.ejs
2016-10-30 11:31:39 +00:00

48 lines
1.8 KiB
Plaintext

<% include ../fragments/header.ejs %>
<div class="container main-content">
<h1>Connect with <%= application.title %></h1>
<form action="/auth/finish" method="post">
<input type="hidden" name="transaction_id" value="<%= transaction_id %>">
<input type="hidden" name="response_type" value="<%= response_type %>">
<input type="hidden" name="client_id" value="<%= application.oauth_id %>">
<input type="hidden" name="auth_url" value="<%= currentURL %>">
<input type="hidden" name="scope" value="<%= scope.join(',') %>">
<div class="">
<p><%= application.title %> requires permission to:</p>
<ul>
<% scope.forEach(function(i){ %>
<li><%= map[i] %></li>
<% });%>
</ul>
<% if (user) { %>
<p>Click <em>Authorise</em> to allow this app access</p>
<% } else { %>
<p>Please sign in to allow this app access</p>
<% } %>
<div>
<% if (user) { %>
<div class="form-group">
<p>Signed in as <strong><%= user.name%></strong>.</p>
<a href="/logout?next=">Not </a><%= user.name%>?
<input type="submit" value="Authorise">
</div>
<% } else { %>
<div class="form-group">
<label for="username">Username: </label>
<input type="text" id="username" name="username"/>
</div>
<div>
<label for="password">Password: </label>
<input type="password" id="password" name="password">
</div>
<div>
<input type="submit" value="Authorise">
</div>
<% } %>
</form>
</div>
<% include ../fragments/footer.ejs %>