forked from mozilla-iam/auth0-custom-lock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
272 lines (267 loc) · 17.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!--
_.-~-.
7'' Q..\
_7 (_
_7 _/ _q. /
_7 . ___ /VVvv-'_ .
7/ / /~- \_\\ '-._ .-' / //
./ ( /-~-/||'=.__ '::. '-~'' { ___ / // ./{
V V-~-~| || __''_ ':::. ''~-~.___.-'' _/ // / {_ / { /
VV/-~-~-|/ \ .'__'. '. ':: _ _ _ ''.
/ /~~~~||VVV/ / \ ) \ _ __ ___ ___ ___(_) | | __ _ .::'
/ (~-~-~\\.-' / \' \::::. | '_ ` _ \ / _ \_ / | | |/ _` | :::'
/..\ /..\__/ ' '::: | | | | | | (_) / /| | | | (_| | ::'
vVVv vVVv ': |_| |_| |_|\___/___|_|_|_|\__,_| ''
This is the custom Mozilla Login Experience, designed and built by Mozilla's IAM Project.
Version: {{{ version }}}
Changelog: https://github.com/mozilla-iam/auth0-custom-lock/blob/master/CHANGELOG.md
These are the variables we are using:
Auth0-domain: {{{ auth0_domain }}}
Client ID: {{{ client_ID }}}
LDAP connection name: {{{ LDAP_connection_name }}}
Person API domain: {{{ person_api_domain }}}
Google Tag Manager ID: {{{ GTM_ID }}}
Logout URL: {{{ logout_url }}}
SSO Dashboard URL: {{{ sso_dashboard_url }}}
CSP: {{{ csp }}}
CDN: {{{ cdn }}}
Features:
autologin: {{{ features.autologin }}}
person_api_lookup: {{{ features.person_api_lookup }}}
supportedLoginMethods: {{{ supportedLoginMethods }}}
Display names:
github: {{{ displayNames.github }}}
google-oauth2: {{{ displayNames.google-oauth2 }}}
firefoxaccounts: {{{ displayNames.firefoxaccounts }}}
email: {{{ displayNames.email }}}
The code is the result of a build process, please find the source code
on GitHub: https://github.com/mozilla-iam/auth0-custom-lock
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mozilla Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="{{{ csp }}}">
<link rel="dns-prefetch" href="{{{ person_api_domain }}}">
<link rel="stylesheet" href="{{{ cdn }}}/css/fonts.css" type="text/css" />
<link rel="stylesheet" href="{{{ cdn }}}/css/styles.css" type="text/css" />
<link rel="icon" href="{{{ cdn }}}/images/favicon.png" type="image/png" sizes="196x196" />
</head>
<body data-decorator="load-ga display-rp-name prevent-clickjack track-password-manager-usage">
<div data-decorator="check-if-maintenance-mode" hidden>
<div class="banner">
<p>We are currently experiencing an issue & working hard to resolve it. Please try to login again in a few minutes. Request help via <a href="mailto:moc@mozilla.com">moc@mozilla.com</a>, IRC #moc or Slack #mozsm-all.</p>
</div>
</div>
<div class="card">
<a href="https://mozilla.org" class="logo" target="_blank"><img alt="Mozilla" src="{{{ cdn }}}/images/mozilla.svg" /></a>
<noscript><p>This login form requires JavaScript to work, please enable it to log in.</p></noscript>
<form id="nlx-form" data-decorator="init-auth handle-submit" method="post" action="/" lock-state="initial">
<fieldset class="hidden-lastpass-password-offset" data-decorator="decide-screen">
<legend class="rp-name"><span class="visually-hidden">Log in to </span><span id="rp-name-placeholder" class="rp-name__text"></span></legend>
<div id="loading" class="loading" data-screen hidden>
<p class="visually-hidden">Loading…</p>
<img src="{{{ cdn }}}/images/loading.svg" class="loading__spinner" />
<p role="alert" id="loading__status" class="loading__status"></p>
</div>
<div id="initial" data-screen hidden>
<div class="form__input">
<input type="email" name="username" id="field-email" autocomplete="email" autofocus data-decorator="watch-contents" />
<label for="field-email"><span><span aria-hidden="true">Log in with </span>email</span></label>
</div>
<input type="submit" class="button button--full-width" id="enter-initial" value="Enter" />
<hr>
<ul class="login-options list list--plain">
<li data-optional-login-method="firefoxaccounts">
<button class="button button--full-width button--social button--secondary" type="button" data-handler="authorise-firefoxaccounts">
<img class="icon" src="{{{ cdn }}}/images/firefox.svg">
<span>Log in with Firefox</span>
</button>
</li>
<li data-optional-login-method="github">
<button class="button button--full-width button--social button--secondary" type="button" data-handler="authorise-github">
<img class="icon" src="{{{ cdn }}}/images/github.svg">
<span>Log in with GitHub</span>
</button>
</li>
<li data-optional-login-method="google-oauth2">
<button class="button button--full-width button--social button--secondary" type="button" data-handler="authorise-google">
<img class="icon" src="{{{ cdn }}}/images/google.svg">
<span>Log in with Google</span>
</button>
</ul>
<div data-decorator="hide-autologin-setting-conditionally">
<hr>
<div class="setting">
<a href="#what-is-autologin" class="link-to-tooltip" data-decorator="tooltip"><span class="visually-hidden">What is Auto-login?</span> <img class="icon" src="{{{ cdn }}}/images/info.svg"></a>
<input type="checkbox" id="use-autologin" data-decorator="set-autologin-preference" checked>
<label for="use-autologin"><span class="setting__toggle"></span> <span class="setting__enabled-text">Auto-login is enabled</span><span class="setting__disabled-text">Auto-login is disabled</span></label>
<div id="what-is-autologin" class="tooltip">
<p>Auto-login will allow you to bypass this screen in the future and be automatically logged in via your chosen login method. This setting can soon be edited by visiting your user menu on the SSO Dashboard.</p>
</div>
</div>
</div>
</div>
<div id="initial-login-signup" data-screen hidden>
<div class="form__input">
<input type="email" name="username" id="field-email-signup" autocomplete="email" data-decorator="watch-contents" />
<label for="field-email-signup"><span><span aria-hidden="true">Log In or Sign Up with </span>email</span></label>
</div>
<input type="submit" class="button button--full-width" id="enter-initial-signup" value="Enter" />
<hr>
<ul class="login-options list list--plain">
<li data-optional-login-method="firefoxaccounts">
<button class="button button--full-width button--social button--secondary" type="button" data-handler="authorise-firefoxaccounts">
<img class="icon" src="{{{ cdn }}}/images/firefox.svg">
<span>Continue with Firefox</span>
</button>
</li>
<li data-optional-login-method="github">
<button class="button button--full-width button--social button--secondary" type="button" data-handler="authorise-github">
<img class="icon" src="{{{ cdn }}}/images/github.svg">
<span>Continue with GitHub</span>
</button>
</li>
<li data-optional-login-method="google-oauth2">
<button class="button button--full-width button--social button--secondary" type="button" data-handler="authorise-google">
<img class="icon" src="{{{ cdn }}}/images/google.svg">
<span>Continue with Google</span>
</button>
</ul>
<div data-decorator="hide-autologin-setting-conditionally">
<hr>
<div class="setting">
<a href="#what-is-autologin-2" class="link-to-tooltip" data-decorator="tooltip"><span class="visually-hidden">What is Auto-login?</span> <img class="icon" src="{{{ cdn }}}/images/info.svg"></a>
<input type="checkbox" id="use-autologin-2" data-decorator="set-autologin-preference" checked>
<label for="use-autologin-2"><span class="setting__toggle"></span> <span class="setting__enabled-text">Auto-login is enabled</span><span class="setting__disabled-text">Auto-login is disabled</span></label>
<div id="what-is-autologin-2" class="tooltip">
<p>Auto-login will allow you to bypass this screen in the future and be automatically logged in via your chosen login method. This setting can soon be edited by visiting your user menu on the SSO Dashboard.</p>
</div>
</div>
</div>
</div>
<div id="ldap" data-screen hidden>
<div class="form__input">
<input type="password" id="field-password" autocomplete="current-password" name="password" data-decorator="submit-with-enter watch-contents" data-continue-with="authorise-ldap-credentials" />
<label for="field-password"><span>LDAP password</span></label>
</div>
<input type="submit" class="button button--full-width" id="authorise-ldap-credentials" value="Enter"/>
<hr>
<button type="button" class="button button--text-only card__back button--unpadded" data-handler="go-to-initial-page">Need to start over with a different account?</button>
</div>
<div id="non-ldap" data-screen hidden>
<ul class="login-options list list--plain" data-optional-login-method="email">
<li>
<button class="button button--full-width button--secondary" type="button" data-handler="send-passwordless-link">Send me an email to continue</button>
</li>
</ul>
<a href="https://wiki.mozilla.org/IAM/Frequently_asked_questions#Q:_Why_do_you_support_email_login_.28.22passwordless.22.29_if_it.27s_less_safe_than_other_methods.3F" class="button button--text-only button--unpadded" target="_blank">Why an email?</a>
<hr>
<ul class="login-options list list--plain">
<li data-optional-login-method="firefoxaccounts">
<button class="button button--full-width button--social button--secondary" type="button" data-handler="authorise-firefoxaccounts">
<img class="icon" src="{{{ cdn }}}/images/firefox.svg">
<span>Continue with Firefox</span>
</button>
</li>
<li data-optional-login-method="github">
<button class="button button--full-width button--social button--secondary" type="button" data-handler="authorise-github">
<img class="icon" src="{{{ cdn }}}/images/github.svg">
<span>Continue with GitHub</span>
</button>
</li>
<li data-optional-login-method="google-oauth2">
<button class="button button--full-width button--social button--secondary" type="button" data-handler="authorise-google">
<img class="icon" src="{{{ cdn }}}/images/google.svg">
<span>Continue with Google</span>
</button>
</ul>
<hr>
<button type="button" class="button button--text-only card__back button--unpadded" data-handler="go-to-initial-page">Need to start over with a different account?</button>
</div>
<div id="passwordless-success" data-screen hidden>
<h2 class="card__heading card__heading--success"><img src="{{{ cdn }}}/images/envelope.svg" class="card__heading-icon" /> <span>Success</span></h2>
<p>Email sent to <span id="passwordless-success-email-address"></span>, go to your inbox to continue. Your login link will expire in 15 minutes.</p>
<hr>
<button id="back" type="button" class="button button--text-only card__back button--unpadded" data-handler="go-to-initial-page">Need to send that to a different email?</button>
</div>
<div id="error-password" data-screen hidden>
<h2 class="card__heading card__heading--error" id="error-message-ldap"><img src="{{{ cdn }}}/images/circled-x.svg" class="card__heading-icon" /> <span>Error</span></h2>
<p>Please attempt again or contact the Help Desk for assistance.</p>
<div class="form__input">
<input type="password" id="field-password-try-2" autocomplete="current-password" name="password" data-decorator="submit-with-enter watch-contents" data-continue-with="authorise-ldap-credentials" />
<label for="field-password-try-2"><span>LDAP password</span></label>
</div>
<input type="submit" class="button button--full-width" id="authorise-ldap-credentials-try-2" value="Enter" />
<hr>
<button type="button" class="button button--text-only card__back button--unpadded" data-handler="go-to-initial-page">Need to start over with a different account?</button>
</div>
<div id="error-passwordless" data-screen hidden>
<h2 class="card__heading card__heading--error" id="error-message-passwordless"><img src="{{{ cdn }}}/images/circled-x.svg" class="card__heading-icon" /> <span>Error</span></h2>
<p>We cannot send an email to this address</p>
<button type="button" class="button button--text-only card__back button--unpadded" data-handler="go-to-initial-page">Try again</button>
<hr>
<button type="button" class="button button--text-only card__back button--unpadded" data-handler="go-to-initial-page">Need to start over with a different account?</button>
</div>
<div id="ldap-not-available" data-screen hidden>
<h2 class="card__heading card__heading--error"><img src="{{{ cdn }}}/images/circled-x.svg" class="card__heading-icon" /> <span>Error</span></h2>
<p>Unfortunately, this website does not offer login with Mozilla LDAP.</p>
<hr>
<button type="button" class="button button--text-only card__back button--unpadded" data-handler="go-to-initial-page">Need to start over with a different account?</button>
</div>
<div id="ldap-required" data-screen hidden>
<h2 class="card__heading card__heading--error"><img src="{{{ cdn }}}/images/circled-x.svg" class="card__heading-icon" /> <span>Error</span></h2>
<p>Unfortunately, you can only login to this website using Mozilla LDAP.</p>
<hr>
<button type="button" class="button button--text-only card__back button--unpadded" data-handler="go-to-initial-page">Need to start over with a different account?</button>
</div>
<div id="autologin-settings" data-screen hidden>
<h2 class="card__heading card__heading--iconless">Auto-login settings</h2>
<p data-decorator="fill-in-session-info">You are currently logged in<span data-email hidden> as <strong></strong></span><span data-login-method hidden> using <strong></strong></span>.</p>
<div class="setting">
<input type="checkbox" id="use-autologin-2" data-decorator="set-autologin-preference" checked>
<label for="use-autologin-2"><span class="setting__toggle"></span> <span class="setting__enabled-text">Auto-login is enabled</span><span class="setting__disabled-text">Auto-login is disabled</span></label>
</div>
<hr>
<ul class="login-options list list--plain">
<li><a href="{{{ sso_dashboard_url }}}" class="button button--full-width button--secondary">Back to Dashboard</a></li>
<li><a href="{{{ sso_dashboard_url }}}/logout" class="button button--full-width button--secondary">Log out of Mozilla</a></li>
</ul>
</div>
{{! this input is intentionally hidden to trigger LastPass }}
<input type="password" id="hidden-lastpass-password" autocomplete="current-password" name="hidden-lastpass-password" aria-hidden />
</fieldset>
</form>
<ul class="legal-links list list--plain">
<li><a href="https://www.mozilla.org/en-US/about/legal/" target="_blank">Legal</a></li>
<li><a href="https://www.mozilla.org/en-US/privacy/websites/" target="_blank">Privacy</a></li>
<li><a href="https://discourse.mozilla.org/c/iam" target="_blank">Need help?</a></li>
</ul>
</div>
<script type="text/json" id="nlx-config">
{
"hostedConfig": "@@config@@",
"environment": "{{{ environment }}}",
"domain": "{{{ auth0_domain }}}",
"client_ID": "{{{ client_ID }}}",
"LDAP_connection_name": "{{{ LDAP_connection_name }}}",
"person_api_domain": "{{{ person_api_domain }}}",
"GTM_ID": "{{{ GTM_ID }}}",
"features" : {
"autologin": "{{{ features.autologin }}}",
"person_api_lookup": "{{{ features.person_api_lookup }}}",
"maintenance_mode": "{{{ features.maintenance_mode }}}"
},
"supportedLoginMethods": "{{{ supportedLoginMethods }}}",
"logout_url": "{{{ logout_url }}}",
"displayNames": {
"github": "{{{ displayNames.github }}}",
"google-oauth2": "{{{ displayNames.google-oauth2 }}}",
"firefoxaccounts": "{{{ displayNames.firefoxaccounts }}}",
"email": "{{{ displayNames.email }}}"
}
}</script>
<script src="{{{ cdn }}}/js/main.js"></script>
</body>
</html>