Skip to content

Conversation

jonasbadstuebner
Copy link

Description

What:

  • Adds the remember_me option to the continue_with_login_identifier action

Why:
Whilst implementing a frontend solution for Hanko, I found myself having to implement an exception for the remember_me action, because it should belong to the continue_with_login_identifier action, right below the login identifier field.

I basically have:

┌──────────────────────┐     ┌──────────────────────┐
│ ┌──────────────────┐ │     │ ┌──────────────────┐ │
│ │      Action 1    │ │     │ │  Email           │ │
│ │      Input 1     │ │     │ │ ───────────────  │ │
│ └──────────────────┘ │     │ └──────────────────┘ │
│                      │     │                      │
│ ┌──────────────────┐ │     │ ┌──────────────────┐ │
│ │      Action 1    │ │     │ │  Username        │ │
│ │      Input 2     │ │     │ │ ───────────────  │ │
│ └──────────────────┘ │     │ └──────────────────┘ │
│                      │     │                      │
│ ┌──────────────────┐ │     │ ┌──────────────────┐ │
│ │      Action 1    │ │     │ │  Something       │ │
│ │      Input 3     │ │     │ │ ───────────────  │ │
│ └──────────────────┘ │     │ └──────────────────┘ │
│     ┌──────────┐     │     │     ┌───────────┐    │
│     │  Submit  │     │     │     │  Sign In  │    │
│     └──────────┘     │     │     └───────────┘    │
├──────────────────────┤     ├──────────────────────┤
│ ┌──────────────────┐ │     │ ┌──────────────────┐ │
│ │      Action 2    │ │     │ │  ┌─┐ Remember    │ │
│ │      Input 1     │ │ ──► │ │  └─┘    Me       │ │
│ └──────────────────┘ │     │ └──────────────────┘ │
│     ┌──────────┐     │     │     ┌──────────┐     │
│     │  Submit  │     │     │     │  Submit  │     │
│     └──────────┘     │     │     └──────────┘     │
└──────────────────────┘     └──────────────────────┘

And the "Remember Me" option is not connected to the "Sign In" Action at all.

Implementation

I took the code from the "Remember Me" action (it's not that much) and put it into the "Continue With Login Identifier" action, with the input field only being sent as required input and checked if the cookie retention is set to "prompt".

Tests

I didn't find any test that would have to be adjusted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant