# Signing in, sessions and signing out

Questions about signing in to Talewright, the limits on attempts, staying
signed in, the list of sessions and signing out. The rules are in [Sign-in and
sessions](../accounts/sign-in-and-sessions.md).

## Signing in

### How do I sign in to Talewright?

Open `https://app.usetalewright.com/sign-in`, enter "Email" and "Password" and
choose "Sign in".

More: [Sign-in and sessions, The sign-in page](../accounts/sign-in-and-sessions.md#the-sign-in-page)

### What do I need to sign in?

Your email address and your password. They are the only way to sign in to the
app.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Can I sign in with Google, Microsoft, GitHub or Apple?

No. Talewright has no sign-in through another service. You sign in with your
email address and password.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Does Talewright support single sign-on (SSO or SAML)?

No. An email address and a password are the only way to sign in to the app.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Is there two-factor authentication (2FA)?

No. Sign-in takes an email address and a password, and no second step exists.
To protect an account you can see every session under Settings, "Security",
"Sessions", revoke the ones you do not recognize and change your password.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Can I sign in with a magic link or a one-time code?

No. Sign-in takes the email address and the password. The one emailed link
that signs a browser in is the verification link, and only in the browser that
created the account.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Can I sign in with a passkey, a fingerprint or a security key?

No. An email address and a password are the only way to sign in.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Can I sign in with a username instead of my email?

No. Accounts have no username. Sign-in takes the account's email address.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Do I have to type my email in the same upper and lower case to sign in?

No. The address is matched without regard to upper and lower case. Spaces at
both ends are removed.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Is my password case sensitive?

Yes. The password must match exactly. It is never trimmed, so every character
counts.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Why does my password fail when there is a space after it?

The password must match exactly. A trailing space that is not part of the
password makes it a wrong password.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### Why do I get "Email or password is incorrect."?

The email address has no account, or the password is wrong. Check both. If you
forgot the password, choose "Forgot password?".

More: [Sign-in and sessions, The sign-in page](../accounts/sign-in-and-sessions.md#the-sign-in-page)

### Why does the sign-in page not say whether the email or the password is wrong?

So that nobody can use the sign-in page to find out who has an account. A
wrong password and an unknown email get the same answer.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Can I sign in before verifying my email?

Yes. An account whose email is not verified signs in like any other. The app
shows the reminder "Verify your email".

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Does the sign-in page tell me that my account is unverified?

No. A wrong password gets "Email or password is incorrect." with no hint that
the account is unverified. The right password signs in.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### I changed my email address. Which address do I sign in with?

The new one, once the change is confirmed. The old one then gets
`INVALID_CREDENTIALS`. Until the change is confirmed, the old address still
signs in and the new one does not.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### What does "Enter your password." mean on the sign-in page?

The password field is empty. The form checks the fields before it sends
anything.

More: [Sign-in and sessions, The sign-in page](../accounts/sign-in-and-sessions.md#the-sign-in-page)

### What does "Enter a valid email address and password." mean?

The API refused the email or the password as malformed, in a way the form did
not catch before sending.

More: [Sign-in and sessions, The sign-in page](../accounts/sign-in-and-sessions.md#the-sign-in-page)

### What does "Could not sign in. Try again." mean?

The sign-in failed for a reason other than a wrong email or password, too many
attempts or a malformed value. Try again.

More: [Sign-in and sessions, The sign-in page](../accounts/sign-in-and-sessions.md#the-sign-in-page)

### Is there a "Remember me" option?

No. Every sign-in keeps the browser signed in for the full 30 days. Closing
the browser does not sign out.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Why is the email field already filled in on the sign-in page?

For one of two reasons. After a password reset in the same browser, "Email"
starts filled with the address the reset was requested for. Coming from an
invitation, it starts filled with the invited address.

More: [Sign-in and sessions, The sign-in page](../accounts/sign-in-and-sessions.md#the-sign-in-page)

### Why did the notice above the sign-in form disappear?

A notice such as "Password updated" goes away when a sign-in attempt is
refused.

More: [Sign-in and sessions, The sign-in page](../accounts/sign-in-and-sessions.md#the-sign-in-page)

### Does Talewright email me when someone signs in to my account?

No. No email is sent about a sign-in. You can see every signed-in browser
under Settings, "Security", "Sessions".

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### Can I be signed in to two accounts in the same browser at once?

No. When a second account signs in, the browser belongs to the second account.
The first account's session in that browser is ended in the same step. Its
sessions in other browsers stay.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### I forgot which email address I used. Can the sign-in page tell me?

No. Sign-in never says whether an address has an account, and neither does a
request for a password reset link.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Does sign-in work when the request comes from a page on another website?

No. It is refused with `403 FORBIDDEN`. Only the app itself may sign a browser
in.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

## Limits on sign-in attempts

### How many times can I try to sign in?

Three counts apply, each over 15 minutes:

- 10 attempts for one email address from one client address;
- 100 attempts from one client address, for any email;
- 100 failed attempts for one email address from all client addresses
  together.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### Why do I get "Too many sign-in attempts. Try again in 12 minutes."?

A limit on sign-in attempts was reached. Wait for the time shown, which
varies, or reset your password.

More: [Sign-in and sessions, The sign-in page](../accounts/sign-in-and-sessions.md#the-sign-in-page)

### I typed the right password and still cannot sign in. Why?

After 10 attempts for your email from one client address in 15 minutes, the
next attempt is refused before the password is looked at. Even the correct
password is refused until the 15 minutes end.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### How long am I blocked after too many sign-in attempts?

Until the 15 minutes that began with the first attempt end. The message shows
the time left.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### Is my account locked after too many wrong passwords?

No. There is no lasting lockout. No account is ever locked or disabled by
failed attempts.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### Does a successful sign-in reset my attempt count?

Yes, the count for that email from that client address starts again at zero.
So nine wrong passwords and then the right one sign in. The count for the
client address as a whole is not cleared.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### I am limited at home. Can I sign in from my phone on mobile data?

Yes. The correct password signs in from another network, because the count is
per client address.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### Can someone lock me out by guessing my password over and over?

Only for up to 15 minutes at a time. One address's wrong guesses never block
you on another address. After 100 failed attempts for your email from all
addresses in 15 minutes, every sign-in for it is refused until the window
ends. A password reset lifts that for you.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### Does resetting my password lift a sign-in limit?

Yes. Resetting the password clears the failed attempts for the email, so you
can sign in with the new password at once from the address that completed the
reset.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### Do sign-ins with the correct password count toward the limits?

Toward two of the three. Every attempt, right or wrong, counts for the email
from one client address and for the client address. Correct passwords never
add to the count of failed attempts across all addresses.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### We all sign in from one office network. Can my colleagues' sign-ins block mine?

Yes, in one case. Everyone at one client address shares its limit of 100
attempts in 15 minutes, and successful sign-ins count too.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### Do further attempts while I am blocked extend the wait?

No. Each is refused, and the wait does not grow.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### Do I get an email after failed sign-in attempts on my account?

No. No email is sent about failed attempts.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### Are attempts for an email address that has no account limited too?

Yes. An unknown email is limited after the same number of attempts and with
the same answers as a known one.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### Does a sign-in with an empty password count as an attempt?

No. A request refused because the email or password is malformed is not
counted.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### Why does the wait show seconds one time and minutes another?

A wait under 90 seconds is given in seconds. A longer one is given in minutes.

More: [Sign-in and sessions, The sign-in page](../accounts/sign-in-and-sessions.md#the-sign-in-page)

### What is a "client address" in the attempt limits?

One IPv4 address, or one IPv6 /64 network.

More: [Limits, Rates](../reference/limits.md#rates)

### Can another person sign in from my network while my email is limited there?

Yes, as long as the address has not used up its own 100 attempts. The
10-attempt count is per email.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

## Staying signed in

### How long do I stay signed in?

30 days from the moment you signed in, in that browser. After 30 days you sign
in again.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Does using the app extend my session?

No. A session lasts 30 days from the moment it started, even if it was used a
minute ago.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Does closing the browser sign me out?

No. The browser keeps the session for the full 30 days.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Why was I signed out?

Your session ended. That happens when it is 30 days old, when you sign out,
when the session is revoked, when "Sign out other sessions" is used in another
browser, when the password is changed in another browser, when the password is
reset from an emailed link, when a password is chosen from a verification link
in another browser, or when the account is deleted. A session also ends when
a new one starts in the browser that carried it.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Which Talewright links and sessions expire, and when?

Each has its own lifetime:

- a session: 30 days from its start;
- a verification link: 24 hours, or until it is used or replaced;
- a password reset link: 1 hour, or until it is used or replaced;
- an email change confirmation link: 24 hours, or until it is used, replaced
  or cancelled;
- an invitation link: 7 days, or until it is used, replaced or revoked;
- a count of attempts: 15 minutes from the first attempt.

A new password also ends links early.

More: [Sign-in and sessions, What expires when](../accounts/sign-in-and-sessions.md#what-expires-when)

### What is a session?

One signed-in browser on one device. Tabs and windows of the same browser
share it. Each browser that signs in gets its own.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Can I be signed in on several devices at the same time?

Yes. Each browser that signs in gets its own session, and signing in on one
device ends no session on another. Each is listed under Settings, "Security",
"Sessions". Only signing in again in the same browser ends a session: the one
that browser carried.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### I signed in again in the same browser. Do I now have two sessions there?

No. One browser holds one session. The new sign-in ends the session that
browser carried, also when it belonged to another account. The old one stops
working and leaves the sessions list.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### What ends the session my browser already carries when a new one starts?

A successful sign-in, a sign-up that signs the browser in, and the
verification link signing the browser in. Each ends the session that browser
carried, whichever account it belonged to. Sessions in other browsers and on
other devices are not ended.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Does a refused sign-in end the session my browser has?

No. A sign-in that is refused (wrong password, unknown email, too many
attempts) ends nothing. The browser keeps the session it had. The same holds
for a sign-up with an address that already has an account, which signs nobody
in.

More: [Sign-in and sessions, Signing in](../accounts/sign-in-and-sessions.md#signing-in)

### Do two tabs of the same browser share one sign-in?

Yes. Signing out in one signs out the other, which opens the sign-in page the
next time it loads data.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### What starts a session?

Three things: signing in, creating an account, or opening the verification
link in the browser that created the account.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Which changes to my account do not sign me out?

Changing the email address, changing the name, verifying the email in a
signed-in browser, joining or leaving an organization, and being removed from
one.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Am I signed out when I am removed from an organization?

No. The session stays. The organization's workspaces disappear from your
account.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### What happens when my session expires while the app is open?

The session stops working at 30 days, even if it was used a minute ago. The
app opens the sign-in page at the next request.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Does signing out revoke my API keys or connected apps?

No. Signing out, revoking a session and "Sign out other sessions" leave them
working. A password change or reset revokes them.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### What does Talewright record about each session?

When it started, when it was last active, and the browser's `User-Agent` at
the moment it started.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Does the sessions list show an IP address or a location?

No. Each row names the device and shows when the session was last active and
when it signed in.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### Which cookie keeps me signed in?

`__Host-session`. It is valid for 30 days and is set with `HttpOnly`, `Secure`
and `SameSite=Lax`.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

## The sessions page

### Where can I see which devices are signed in to my account?

Open Settings, then "Security", then "Sessions". The page is at
`https://app.usetalewright.com/settings/security/sessions`.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### How do I sign out another device remotely?

Choose "Revoke" on its row on the sessions page. The app answers "Session
revoked" and the row is gone.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### How do I sign out everywhere?

Choose "Sign out other sessions" on the sessions page, which ends every
session except the one you are using. Then sign out. A password reset from an
emailed link also ends every session.

More: [Sign-in and sessions, The sessions list](../accounts/sign-in-and-sessions.md#the-sessions-list)

### Why is there no "Sign out other sessions" button?

The button appears only while there is at least one other session.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### Why is there no "Revoke" button on the session marked "This browser"?

Ending the session you are using is what "Sign out" does. The app does not
offer "Revoke" on the current session.

More: [Sign-in and sessions, The sessions list](../accounts/sign-in-and-sessions.md#the-sessions-list)

### What does "This browser" mean in the sessions list?

It marks the session of the browser you are using. It is listed first.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### I revoked a session, but that browser still shows the app. Why?

It is signed out at its next request. The page it already loaded stays on
screen until then.

More: [Sign-in and sessions, The sessions list](../accounts/sign-in-and-sessions.md#the-sessions-list)

### I see a session I do not recognize. What should I do?

Choose "Revoke" on it, then change your password. Changing the password signs
out every other session and revokes your API keys and connected apps.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### Why is a session shown as "Unknown device"?

The client that started it sent no `User-Agent`, for example a script.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### Why does a session show a name like "curl/8.7.1"?

Neither a known browser nor a known system was recognized, so the row shows
the client's own name.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### How does the sessions page name a device?

By browser and system, as in "Chrome on macOS" or "Safari on iOS". It knows
Edge, Firefox, Chrome and Safari, and iOS, iPadOS, Android, macOS, Windows and
Linux. When only one of the two is known, it shows that one alone.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### Why is my browser listed under another browser's name?

A browser the list does not know by name is shown by what its `User-Agent`
reports. A browser built on another one can appear under that one's name.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### Why does "Last active" look a little old?

It is updated at most once a minute.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### Do ended or expired sessions stay in the list?

No. Only live sessions are listed.

More: [Sign-in and sessions, The sessions list](../accounts/sign-in-and-sessions.md#the-sessions-list)

### In what order are my sessions listed?

The app puts the current one first. The API lists sessions newest first.

More: [Sign-in and sessions, The sessions list](../accounts/sign-in-and-sessions.md#the-sessions-list)

### What does "Load more" do on the sessions page?

It shows the next sessions when the account has more than 50.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

### Can an owner or admin see or end my sessions?

No. Nobody can see or end another person's sessions, and no role grants that.

More: [Sign-in and sessions, Who can do what](../accounts/sign-in-and-sessions.md#who-can-do-what)

### Do API keys and connected apps appear in the sessions list?

No. Credentials have their own pages.

More: [Sign-in and sessions, Edge cases](../accounts/sign-in-and-sessions.md#edge-cases)

### What do the dates on a session row mean?

"Last active" is when the session was last used. "Signed in" is when it
started. Each is a column of the table "Sessions", with a date and time.

More: [Sign-in and sessions, The sessions page](../accounts/sign-in-and-sessions.md#the-sessions-page)

## Signing out

### How do I sign out?

Open the account menu at the bottom of the navigation and choose "Sign out".
Or open the command palette and choose "Sign out".

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out-1)

### Does signing out sign me out on my other devices?

No. Signing out ends the current session and clears it from the browser. Other
sessions stay.

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out)

### What happens to my unsaved changes when I sign out?

The app asks first. With unsaved drafts in the browser tab, "Sign out" opens
the dialog "Discard unsaved changes?". "Cancel" keeps the session, the page
and the drafts. "Discard and sign out" signs out and removes them.

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out)

### What does the "Discard unsaved changes?" dialog say?

"One draft has changes that are not saved. Signing out removes them from this
browser." With several drafts it gives the count, as in "3 drafts have changes
that are not saved." The buttons are "Cancel" and "Discard and sign out".

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out-1)

### Can someone press Back in the browser and see my account after I sign out?

No. Going back shows the sign-in page, not the account's pages, because
entering the app asks the server again.

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out)

### What does signing out remove from a shared computer?

The open tabs and unsaved drafts of the browser tab that signed out, and the
browser's memory of the last used workspace and of an invitation link that was
waiting.

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out)

### Where is "Sign out" when I have no organization yet?

On "Set up your organization", which has its own "Sign out" button.

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out-1)

### What is in the account menu?

Your name and email address, "Settings", "Appearance" and "Sign out". It is at
the bottom of the navigation.

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out-1)

### What happens if I sign out when my session has already ended?

Nothing goes wrong. Signing out without a session is not an error. `POST
/v1/auth/sign-out` answers `204` with or without a live session, and the
cookie is cleared.

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out)

### Does "Sign out" in the command palette also ask about unsaved drafts?

Yes. The question is the same from the account menu and from the command
palette.

More: [Sign-in and sessions, Signing out](../accounts/sign-in-and-sessions.md#signing-out)

## Where the app goes after sign-in

### Where does the app take me after I sign in?

To the page you asked for before signing in. Without one, it opens its start
page: a waiting invitation first, otherwise the last used workspace's Files &
Assets.

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

### Why did I land on "Set up your organization" after signing in?

Your account has no organization yet.

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

### What does "No workspace yet" mean after signing in?

Your account belongs to one or more organizations, but they gave it no
workspace.

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

### I opened a link to a page and had to sign in first. Do I get to that page?

Yes. A signed-out person who opens a page of the app lands on the sign-in
page, and after signing in the app opens the linked page.

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

### Why does an invitation open first after I sign in?

You opened an invitation link before signing in. Without a return path, a
waiting invitation opens before the last used workspace.

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

### What is the `returnTo` parameter in the sign-in address?

The return path: the page the app opens after sign-in, as in
`/sign-in?returnTo=/settings/security`. It is kept when moving between "Sign
in" and "Create account".

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

### Can `returnTo` send me to another website after sign-in?

No. The return path is honored only when it is a path inside the app. An
address on another site, or anything that does not start with `/`, is ignored
and the start page opens.

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

### Why did I land on the start page after resetting my password, not on the page I wanted?

The return path is not kept through "Forgot password?". After a password
reset, signing in opens the start page.

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

### What happens when I open the sign-in page while I am signed in?

The form is not shown. The browser is sent straight to the return path, or to
the start page.

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

### What is the `notice` parameter in the sign-in address?

It selects the notice above the form. Its values are `password-updated`,
`email-verified` and `account-deleted`. Any other value is ignored.

More: [Sign-in and sessions, Where the app goes after sign-in](../accounts/sign-in-and-sessions.md#where-the-app-goes-after-sign-in)

## For developers and agents

### Can an AI agent or a script sign in to Talewright?

It does not need to. An agent sends an API key or a connected app's token with
each request. The session operations refuse such a token.

More: [Sign-in and sessions, Who can do what](../accounts/sign-in-and-sessions.md#who-can-do-what)

### How do I sign in through the API?

Send `POST /v1/auth/sign-in` with `email` and `password`. `204` means signed
in: the response sets the cookie `__Host-session`, valid for 30 days, and has
no body. A live session named by the request's own `__Host-session` cookie is
ended in the same step, whichever account it belonged to.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

### How do I check whether a browser is signed in without getting an error?

Call `GET /v1/auth/session`. It answers `200` with `{"me": null}` for a
visitor without a live session, including an expired or invalid cookie. With a
live session, `me` is the same object as `GET /v1/me`.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

### What does `GET /v1/me` return?

`user` (`id`, `email`, `fullName`), `emailVerified`, `pendingEmail` (an
address or `null`) and `workspaces`, each with `id`, `name`, `organizationID`,
`organizationName` and `role`.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

### Why do I get `403 FORBIDDEN` with reason `SESSION_REQUIRED`?

A valid API key called an operation that only a browser session may call.
The message is "This operation needs a person signed in with a browser". Do
it in the app. A token that does not authenticate, a connected app's token
included, answers `401 UNAUTHENTICATED` with reason `INVALID_TOKEN` instead.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

### Why do I get `401 UNAUTHENTICATED` with reason `AMBIGUOUS_CREDENTIALS`?

The request carried both a session cookie and a bearer token. Send one of
them. A script should send no cookies.

More: [Errors, `UNAUTHENTICATED` (401)](../reference/errors.md#unauthenticated-401)

### Why is my `POST` with a session cookie refused with `403 FORBIDDEN`?

A request that changes something and carries a session cookie must send an
`Origin` header equal to the app's origin, `https://app.usetalewright.com`.
Any other `Origin`, or none, is refused.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

### How do I list my sessions through the API?

Call `GET /v1/me/sessions` with a session. It takes `cursor` and `limit` (1 to
100, default 50) and returns `items` and `nextCursor`. Each item has `id`,
`current`, `createdAt`, `lastSeenAt` and `userAgent`.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

### How do I end one session through the API?

Send `DELETE /v1/me/sessions/{sessionID}`. `204` means ended. If it was the
current session, the response clears the cookie.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

### Why do I get `404 NOT_FOUND` when I revoke a session?

The ID is not a live session of yours: it is unknown, already ended, expired,
malformed or another person's. Nothing is ended. Revoking the same session
twice gives `404` the second time.

More: [Sign-in and sessions, The sessions list](../accounts/sign-in-and-sessions.md#the-sessions-list)

### Can I end my current session by its ID?

Through the API, yes. That clears the session cookie, like signing out. The
app offers "Sign out" for that instead of "Revoke".

More: [Sign-in and sessions, The sessions list](../accounts/sign-in-and-sessions.md#the-sessions-list)

### What does `POST /v1/me/sessions/revoke-others` answer when there is no other session?

`204`, the same as when it ended some.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

### What does `401 UNAUTHENTICATED` "Authentication required" mean?

The request has no live session: none was sent, or it expired or was ended.
Sign in again.

More: [Sign-in and sessions, Errors](../accounts/sign-in-and-sessions.md#errors)

### Is any sign-in or session operation an MCP tool?

No. No operation for signing in, signing out or managing sessions is an MCP
tool, and no credential scope grants any of them.

More: [Sign-in and sessions, Who can do what](../accounts/sign-in-and-sessions.md#who-can-do-what)

### What is the difference between `INVALID_CREDENTIALS` and a wrong current password?

Only sign-in answers `401 INVALID_CREDENTIALS`. A wrong current password
inside the app, when changing the password or the email or deleting the
account, answers `422 VALIDATION_FAILED` on `currentPassword`.

More: [Errors, `INVALID_CREDENTIALS` (401)](../reference/errors.md#invalid_credentials-401)

### How long can the email and the password be at sign-in?

The email is 1 to 320 characters. The password is 1 to 1024 bytes.

More: [Sign-in and sessions, Limits](../accounts/sign-in-and-sessions.md#limits)

### In what order does `GET /v1/me` list workspaces?

By organization name, then workspace name. Workspaces of a deleted
organization are not included.

More: [Sign-in and sessions, The account a session can read](../accounts/sign-in-and-sessions.md#the-account-a-session-can-read)

### What is stored as the `User-Agent` of a session?

The `User-Agent` the client sent when the session started, with control
characters removed and cut to 512 characters. A client that sends none has
none recorded.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### How does the API tell a script how long to wait after `RATE_LIMITED`?

With the `Retry-After` header and `details.retryAfterSeconds`, in whole
seconds. Further attempts before then are refused and do not extend the wait.

More: [Sign-in and sessions, Limits on sign-in attempts](../accounts/sign-in-and-sessions.md#limits-on-sign-in-attempts)

### What is the difference between a browser session and an API key?

A session belongs to a person signed in with a browser and lasts 30 days. An
API key is a credential sent with each request. The session-only operations
refuse it, and signing out does not revoke it.

More: [Sign-in and sessions, Sessions](../accounts/sign-in-and-sessions.md#sessions)

### What happens to a request that sends an API key to the sign-in operation?

The bearer token is ignored. Sign-in is a public operation.

More: [Sign-in and sessions, For agents](../accounts/sign-in-and-sessions.md#for-agents)

### Why does the sessions list answer `VALIDATION_FAILED`?

The `cursor` is invalid, or the `limit` is outside 1 to 100. Use the
`nextCursor` of the previous page and a valid limit.

More: [Sign-in and sessions, Errors](../accounts/sign-in-and-sessions.md#errors)
