mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-25 19:10:53 +00:00
document, session item
This commit is contained in:
@@ -269,6 +269,10 @@ export async function GET(request: NextRequest) {
|
|||||||
if (authRequest.prompt.includes(Prompt.SELECT_ACCOUNT)) {
|
if (authRequest.prompt.includes(Prompt.SELECT_ACCOUNT)) {
|
||||||
return gotoAccounts();
|
return gotoAccounts();
|
||||||
} else if (authRequest.prompt.includes(Prompt.LOGIN)) {
|
} else if (authRequest.prompt.includes(Prompt.LOGIN)) {
|
||||||
|
/**
|
||||||
|
* The login prompt instructs the authentication server to prompt the user for re-authentication, regardless of whether the user is already authenticated
|
||||||
|
*/
|
||||||
|
|
||||||
// if a hint is provided, skip loginname page and jump to the next page
|
// if a hint is provided, skip loginname page and jump to the next page
|
||||||
if (authRequest.loginHint) {
|
if (authRequest.loginHint) {
|
||||||
try {
|
try {
|
||||||
@@ -299,7 +303,11 @@ export async function GET(request: NextRequest) {
|
|||||||
}
|
}
|
||||||
return NextResponse.redirect(loginNameUrl);
|
return NextResponse.redirect(loginNameUrl);
|
||||||
} else if (authRequest.prompt.includes(Prompt.NONE)) {
|
} else if (authRequest.prompt.includes(Prompt.NONE)) {
|
||||||
// NONE prompt - silent authentication
|
/**
|
||||||
|
* With an OIDC none prompt, the authentication server must not display any authentication or consent user interface pages.
|
||||||
|
* This means that the user should not be prompted to enter their password again.
|
||||||
|
* Instead, the server attempts to silently authenticate the user using an existing session or other authentication mechanisms that do not require user interaction
|
||||||
|
**/
|
||||||
const selectedSession = findValidSession(sessions, authRequest);
|
const selectedSession = findValidSession(sessions, authRequest);
|
||||||
|
|
||||||
if (!selectedSession || !selectedSession.id) {
|
if (!selectedSession || !selectedSession.id) {
|
||||||
|
@@ -114,11 +114,13 @@ export function SessionItem({
|
|||||||
{verifiedAt && moment(timestampDate(verifiedAt)).fromNow()}
|
{verifiedAt && moment(timestampDate(verifiedAt)).fromNow()}
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span className="text-xs opacity-80 text-ellipsis">
|
verifiedAt && (
|
||||||
expired{" "}
|
<span className="text-xs opacity-80 text-ellipsis">
|
||||||
{session.expirationDate &&
|
expired{" "}
|
||||||
moment(timestampDate(session.expirationDate)).fromNow()}
|
{session.expirationDate &&
|
||||||
</span>
|
moment(timestampDate(session.expirationDate)).fromNow()}
|
||||||
|
</span>
|
||||||
|
)
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user