oidc: Show where one logs in
This commit is contained in:
+4
-21
@@ -319,37 +319,20 @@ function renderInteractionPage(provider) {
|
||||
|
||||
debug(`route interaction get uid:${uid} prompt.name:${prompt.name} client_id:${params.client_id} session:${session}`);
|
||||
|
||||
const client = await provider.Client.find(params.client_id);
|
||||
const [error, client] = await safe(clientsGet(params.client_id));
|
||||
if (error) return next(error);
|
||||
|
||||
switch (prompt.name) {
|
||||
case 'login': {
|
||||
return res.render('login', {
|
||||
client,
|
||||
submitUrl: `${ROUTE_PREFIX}/interaction/${uid}/login`,
|
||||
uid,
|
||||
details: prompt.details,
|
||||
params,
|
||||
title: 'Sign-in',
|
||||
session: session ? debug(session) : undefined,
|
||||
dbg: {
|
||||
params: debug(params),
|
||||
prompt: debug(prompt),
|
||||
},
|
||||
name: client?.name || 'Cloudron'
|
||||
});
|
||||
}
|
||||
case 'consent': {
|
||||
return res.render('interaction', {
|
||||
client,
|
||||
submitUrl: `${ROUTE_PREFIX}/interaction/${uid}/confirm`,
|
||||
uid,
|
||||
details: prompt.details,
|
||||
params,
|
||||
title: 'Authorize',
|
||||
session: session ? debug(session) : undefined,
|
||||
dbg: {
|
||||
params: debug(params),
|
||||
prompt: debug(prompt),
|
||||
},
|
||||
name: client?.name || 'Cloudron'
|
||||
});
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user