Skip to content
Snippets Groups Projects
Commit d90312bd authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Merge branch 'feature_primaries' of github.com:mozilla/browserid into feature_primaries

parents 313627d3 d5eb389f
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,10 @@ exports.setup = function(app) {
});
});
app.get("/authenticate_with_primary", function(req,res, next) {
res.render('authenticate_with_primary.ejs', { layout: false });
});
app.get('/', function(req,res) {
res.render('index.ejs', {title: 'A Better Way to Sign In', fullpage: true});
});
......
var wc = WinChan.onOpen(function(origin, args, cb) {
if (window.location.hash === '#complete') cb();
else {
wc.detach();
window.location = args;
}
});
......@@ -62,7 +62,7 @@ BrowserID.signUp = (function() {
var url = helpers.toURL(verifyURL, {
email: verifyEmail,
return_to: "https://browserid.org/idp_auth_complete"
return_to: "https://browserid.org/authenticate_with_primary#complete"
});
// XXX: we should use winchan (and send user to a page that redirects to primary)!
......@@ -78,11 +78,13 @@ BrowserID.signUp = (function() {
// silently provision again! success means the users is signed up, failure
// means there was an auth problem. they can try again?
var win = winchan.open({
url: url,
url: "https://browserid.org/authenticate_with_primary",
// This is the relay that will be used when the IdP redirects to sign_in_complete
relay_url: "https://browserid.org/relay",
window_features: "width=700,height=375"
window_features: "width=700,height=375",
params: url
}, primaryAuthComplete);
oncomplete && oncomplete();
}
......
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Browser ID</title>
<script type='text/javascript' src='https://browserid.org/lib/winchan.js'></script>
<script type='text/javascript' src='https://browserid.org/auth_with_idp/main.js'></script>
</head>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment