Skip to content

Commit cc1eb7c

Browse files
committed
show app chooser only if is not embedded
1 parent 9cc4b2c commit cc1eb7c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

app.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ var defaultValues = function (req, res, next) {
105105
};
106106

107107
var embedded = function (req, res, next) {
108+
res.locals.embedded = false;
108109
if (req.query.e || req.query.callback) {
109110
res.locals.base_url = nconf.get('DOMAIN_URL_DOCS');
110111
res.locals.embedded = true;
@@ -135,7 +136,7 @@ var overrideIfAuthenticated = function (req, res, next) {
135136
if(err) {
136137
winston.error("error: " + err);
137138
return next(err);
138-
return next(err);callback }
139+
}
139140

140141
if (clients.length === 0) return next();
141142

sdk/demos-routes.js

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module.exports = function (app) {
2020

2121
getDb(function (db) {
2222
db.collection('connections').find({client_id: client.clientID, status: true}).toArray(function(err, connections) {
23+
if (err) return res.send(err);
24+
2325
res.locals.connections = connections;
2426
next();
2527
});

sdk/index.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
p There are different ways of integrating Auth0 in your site. Below, some of them with a preview and a code snippet to copy paste.
22

3-
if account.loggedIn
3+
if account.loggedIn && !embedded
44
div
55
label Select one of your applications:
66
select#client-chooser

0 commit comments

Comments
 (0)