worried-helmet-5462
06/21/2024, 10:22 AMworried-helmet-5462
06/21/2024, 10:23 AMchilly-king-10285
06/21/2024, 10:23 AMworried-helmet-5462
06/21/2024, 10:23 AMworried-helmet-5462
06/21/2024, 10:29 AMchilly-king-10285
06/21/2024, 10:29 AMchilly-king-10285
06/21/2024, 10:29 AMpassword
method for login and registration with email or/and username and password. Additionally, you can use the code
method which implements a one-time-password sent to the user via their recovery addresses (Email, SMS, etc.). When you enable the one-time code method, the login flow will need to send out an email to users signing in through the one-time code method. The system will then use the login_code.valid
template to send the login code to the user. For more details, you can refer to the following documentation: - [Self-service flows](https://www.ory.sh/docs/kratos/self-service) - [Passwordless authentication with one-time code](https://www.ory.sh/docs/kratos/passwordless/one-time-code)worried-helmet-5462
06/21/2024, 10:33 AMchilly-king-10285
06/21/2024, 10:33 AMchilly-king-10285
06/21/2024, 10:33 AM/sessions/whoami
endpoint in Ory Kratos is used to check if a user is signed in and has an active session. It does not provide information about whether a user has completed a code via email. When you make a request to the /sessions/whoami
endpoint with a valid session token or session cookie, the system will return a 200 OK
response and the session payload if the user has an active session. If the user doesn't have an active session, the system returns a 401 Unauthorized
response. Here is an example of how to check for an active session with an Ory Session Token: bash curl -H "Authorization: Bearer {your-session-token}" \ "https://{project.slug}.<http://projects.oryapis.com/sessions/whoami|projects.oryapis.com/sessions/whoami>"
And here is an example of how to check for an active session with an Ory Session Cookie: bash curl -H "Cookie: ory_session_...=..." \ "https://{project.slug}.<http://projects.oryapis.com/sessions/whoami|projects.oryapis.com/sessions/whoami>"
Please note that the {your-session-token}
and {project.slug}
should be replaced with your actual session token and project slug. For more details, you can refer to the following documentation: - [Check session status](https://www.ory.sh/docs/identities/sign-in/check-session-token-cookie-api) - [Integration basics - Session Checks](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#session-checks)worried-helmet-5462
06/21/2024, 10:35 AMchilly-king-10285
06/21/2024, 10:35 AMchilly-king-10285
06/21/2024, 10:35 AMworried-helmet-5462
06/24/2024, 3:31 AMchilly-king-10285
06/24/2024, 3:31 AMchilly-king-10285
06/24/2024, 3:31 AM