This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Custom verify email page * routing
- Loading branch information
Showing
4 changed files
with
85 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{{define "login/verify-email-check"}} | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
{{template "head" .}} | ||
{{template "firebase" .}} | ||
</head> | ||
|
||
<body class="tab-content"> | ||
{{template "navbar" .}} | ||
|
||
<main role="main" class="container"> | ||
{{template "flash" .}} | ||
|
||
<div class="d-flex vh-100"> | ||
<div class="d-flex w-100 justify-content-center"> | ||
<div class="col-sm-6"> | ||
|
||
<div class="card mb-3 shadow-sm"> | ||
<div class="card-header">Email verification</div> | ||
<div class="card-body"> | ||
<p>Verifying email address ownership.</p> | ||
<a class="card-link" href="/">← Login</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
|
||
{{template "scripts" .}} | ||
<script type="text/javascript"> | ||
$(function() { | ||
let urlVars = getUrlVars(); | ||
let code = urlVars["oobCode"]; | ||
if (!code) { | ||
code = ""; | ||
} | ||
|
||
firebase.auth().applyActionCode(code) | ||
.then(function(resp) { | ||
window.location.assign("/login/manage-account?mode=verifyEmail"); | ||
}).catch(function(error) { | ||
flash.error("Invalid email verification code. " | ||
+ "The code may be malformed, expired, or has already been used."); | ||
}); | ||
}); | ||
|
||
function getUrlVars() { | ||
let vars = [], hash; | ||
let queryParams = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | ||
for (var i = 0; i < queryParams.length; i++) { | ||
v = queryParams[i].split('='); | ||
vars.push(v[0]); | ||
vars[v[0]] = v[1]; | ||
} | ||
return vars; | ||
} | ||
</script> | ||
</body> | ||
</html> | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters