Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
129 lines (115 sloc) 7.24 KB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Sign In to Always In Mind</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
</head>
<body>
<!--[if IE 8]>
<script src="//cdnjs.cloudflare.com/ajax/libs/ie8/0.2.5/ie8.js"></script>
<![endif]-->
<!--[if lte IE 9]>
<script src="https://cdn.auth0.com/js/base64.js"></script>
<script src="https://cdn.auth0.com/js/es5-shim.min.js"></script>
<![endif]-->
<script src="https://cdn.auth0.com/js/auth0/9.3.1/auth0.min.js"></script>
<script src="https://cdn.auth0.com/js/lock/11.3/lock.min.js"></script>
<script>
// Decode utf8 characters properly
var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@'))));
config.extraParams = config.extraParams || {};
var connection = config.connection;
var prompt = config.prompt;
var languageDictionary;
var language;
if (config.dict && config.dict.signin && config.dict.signin.title) {
languageDictionary = { title: config.dict.signin.title };
} else if (typeof config.dict === 'string') {
language = config.dict;
}
var loginHint = config.extraParams.login_hint;
var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
auth: {
redirectUrl: config.callbackURL,
responseType: (config.internalOptions || {}).response_type ||
config.callbackOnLocationHash ? 'token' : 'code',
params: config.internalOptions,
connectionScopes: {
'google-oauth2': ['https://picasaweb.google.com/data/', 'https://www.googleapis.com/auth/gmail.readonly']
},
},
assetsUrl: config.assetsUrl,
allowedConnections: ['google-oauth2'],
rememberLastLogin: !prompt,
language: language,
languageDictionary: languageDictionary,
theme: {
logo: 'https://alwaysinmind.org/AiM_LS_Auth0.png',
primaryColor: '#f05a28'
},
// prefill: loginHint ? { email: loginHint, username: loginHint } : null,
closable: false,
// uncomment if you want small buttons for social providers
// socialButtonStyle: 'small'
allowForgotPassword: false,
allowSignUp: false,
languageDictionary: {
title: ""
}
});
lock.show();
lock.on('signin ready', function () {
// Add a new demo button
var btn = document.createElement('button')
btn.className = 'auth0-lock-social-button auth0-lock-social-big-button'
btn.setAttribute('type', 'button')
btn.setAttribute('data-provider', 'demo')
var icon = document.createElement('div')
icon.className = 'auth0-lock-social-button-icon'
var text = document.createElement('div')
text.className = 'auth0-lock-social-button-text'
text.appendChild(document.createTextNode("Try the demo"))
btn.append(icon, text)
var container = document.getElementsByClassName('auth0-lock-social-buttons-container')[0]
container.append(btn)
// Login as demo user
btn.addEventListener('click', function () {
var ep = config.extraParams
// Can no longer access the webauth instance already used by lock
var webAuth = new auth0.WebAuth({
domain: config.auth0Domain,
clientID: config.clientID,
audience: ep.audience,
responseType: ep.response_type,
scope: ep.scope,
redirectUrl: config.callbackURL,
state: ep.state
});
webAuth.login({
realm: 'Username-Password-Authentication',
email: '<EMAIL>',
password: '<ENCODED PWD>'
},
errorObject => {
console.log(JSON.stringify(errorObject, null, 2))
}
);
})
})
</script>
<style>
.auth0-lock button {
font-family: 'Lato', "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif;
}
.auth0-lock-social-button[data-provider="demo"] {
background-color: #2dbe60;
}
.auth0-lock-social-button[data-provider^=demo] .auth0-lock-social-button-icon {
background-image: url("data:image/svg+xml;base64, PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgeG1sbnM6Y2M9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zIyIKICAgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIy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