Skip to content

Commit

Permalink
Consistent messaging after talking to Matt
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Heninger committed Mar 16, 2017
1 parent 4dee1e6 commit b5c3b04
Show file tree
Hide file tree
Showing 7 changed files with 5,557 additions and 17 deletions.
4 changes: 2 additions & 2 deletions api/src/application/user/user-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = (
.catch(error => {
// assume email collision and show validation message
reply.view('user-registration', {
title: 'Register',
title: 'Sign Up',
formAction: `/user/register?${querystring.stringify(request.query)}`,
returnTo: `${request.query.redirect_uri}?status=cancelled`,
error: true,
Expand Down Expand Up @@ -149,7 +149,7 @@ module.exports = (
handleRegistrationPost(request, reply);
} else {
reply.view('user-registration', {
title: 'Register',
title: 'Sign Up',
formAction: `/user/register?${querystring.stringify(request.query)}`,
returnTo: `${request.query.redirect_uri}?status=cancelled`,
error: !!error,
Expand Down
4 changes: 2 additions & 2 deletions api/src/plugins/openid-connect/openid-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ exports.register = function (server, options, next) {
reply.view('login', {
client,
cookie,
title: 'Sign-in',
title: 'Log In',
debug: querystring.stringify(cookie.params, ',<br/>', ' = ', {
encodeURIComponent: value => value,
}),
Expand Down Expand Up @@ -182,7 +182,7 @@ exports.register = function (server, options, next) {
error: 'Invalid email password combination',
client,
cookie,
title: 'Sign-in',
title: 'Log In',
debug: querystring.stringify(cookie.params, ',<br/>', ' = ', {
encodeURIComponent: value => value,
}),
Expand Down
27 changes: 19 additions & 8 deletions api/src/plugins/openid-connect/templates/layout/layout.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sign-in</title>
<title>Log In</title>
<style type="text/css">
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
Expand Down Expand Up @@ -182,7 +182,7 @@
position: relative;
display: block;
width: 100%;
padding: 16px;
padding: 12px 16px;
}
.input-scaffold label,
Expand Down Expand Up @@ -239,13 +239,20 @@
}
/* Alerts */
.alerts {
margin: 8px;
}
.alert {
width: 100%;
height: auto;
padding: 16px;
font-weight: bold;
border-radius: 4px;
margin-bottom: 16px;
}
.alert + .alert {
margin-top: 8px;
}
.alert--error {
Expand All @@ -261,6 +268,7 @@
</head>
<body>
<div class="auth">

<div class="auth-lock">
<div class="auth-header">
{{#if client.logoUri}}
Expand All @@ -271,13 +279,16 @@
<div class="auth-form">
{{{content}}}
</div>
<div class="auth-help">
<a href="{{cookie.returnTo}}">[ Cancel ]</a>
{{#if client.tosUri}}<a href="{{client.tosUri}}">[ Terms of Service ]</a>{{/if}}
{{#if client.policyUri}}<a href="{{client.policyUri}}">[ Privacy Policy ]</a>{{/if}}
</div>
</div>

<div class="auth-help">
<a href="{{cookie.returnTo}}">[ Cancel ]</a>
{{#if client.tosUri}}<a href="{{client.tosUri}}">[ Terms of Service ]</a>{{/if}}
{{#if client.policyUri}}<a href="{{client.policyUri}}">[ Privacy Policy ]</a>{{/if}}
</div>

<div class="auth-underlay" />

</div>
</body>
</html>
4 changes: 2 additions & 2 deletions api/src/plugins/openid-connect/templates/login.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
value="yes"
checked="yes"
>
<span class="toggle-scaffold__label">Stay signed in</span>
<span class="toggle-scaffold__label">Remember me</span>
</label>
</div>

<button type="submit">Sign-in</button>
<button type="submit">Log In</button>
</form>
2 changes: 1 addition & 1 deletion api/templates/user-registration.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@
{{/if}}
</div>

<button type="submit">Register</button>
<button type="submit">Sign Up</button>
</form>
4 changes: 2 additions & 2 deletions test-client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class App extends Component {
return (
<div>
<span>
<a href={`http://sso-client.dev:9000/op/auth?client_id=${config.clientId}&response_type=code id_token token&scope=${config.scope}&redirect_uri=${config.redirectUri}&nonce=nonce`}>Login</a>
<a href={`http://sso-client.dev:9000/op/auth?client_id=${config.clientId}&response_type=code id_token token&scope=${config.scope}&redirect_uri=${config.redirectUri}&nonce=nonce`}>Log In</a>
<span> | </span>
<a href={`http://sso-client.dev:9000/user/register?client_id=${config.clientId}&response_type=code id_token token&scope=${config.scope}&redirect_uri=${config.redirectUri}&nonce=nonce`}>Register</a>
<a href={`http://sso-client.dev:9000/user/register?client_id=${config.clientId}&response_type=code id_token token&scope=${config.scope}&redirect_uri=${config.redirectUri}&nonce=nonce`}>Sign Up</a>
</span>
</div>
);
Expand Down
Loading

0 comments on commit b5c3b04

Please sign in to comment.