[GH-ISSUE #8114] [Bug] Registering by entering the email code doesn't work #3566

Closed
opened 2026-03-23 21:31:22 +00:00 by mirror · 7 comments
Owner

Originally created by @timas130 on GitHub (Jul 9, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8114

Bug Description

No matter how hard you try, if you don't have an account and try to log in by using the code from the email instead of following the link, you will be greeted with an error.

How to Reproduce

  1. Reach the login form
  2. Enter your email
  3. Click "Continue with Email"
  4. Click "Enter code manually"
  5. Enter the code from the email
  6. Click "Continue with login code"
  7. Depending on the environment, you will either see an error or be greeted with a blank and broken workspace

Expected Behavior

I am able to sign up

Operating System

Web, Linux, Android

AppFlowy Version(s)

0.9.4

Screenshots

No response

Additional Context

Happens both on self hosted instances, as well as on appflowy.com.

Originally created by @timas130 on GitHub (Jul 9, 2025). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8114 ### Bug Description No matter how hard you try, if you don't have an account and try to log in by using the code from the email instead of following the link, you will be greeted with an error. ### How to Reproduce 1. Reach the login form 2. Enter your email 3. Click "Continue with Email" 4. Click "Enter code manually" 5. Enter the code from the email 6. Click "Continue with login code" 7. Depending on the environment, you will either see an error or be greeted with a blank and broken workspace ### Expected Behavior I am able to sign up ### Operating System Web, Linux, Android ### AppFlowy Version(s) 0.9.4 ### Screenshots _No response_ ### Additional Context Happens both on self hosted instances, as well as on appflowy.com.
Author
Owner

@khorshuheng commented on GitHub (Jul 10, 2025):

If it is appflowy.com, how's the error like? What is displayed on the dev console?

<!-- gh-comment-id:3054831347 --> @khorshuheng commented on GitHub (Jul 10, 2025): If it is appflowy.com, how's the error like? What is displayed on the dev console?
Author
Owner

@timas130 commented on GitHub (Jul 10, 2025):

@khorshuheng

In the console:

Uncaught (in promise) Error: No workspace or service found

Over the network:

Record not found:Can't find the user profile for user: 131a6c51-[...]-bd4cfdf0e664
<!-- gh-comment-id:3056938165 --> @timas130 commented on GitHub (Jul 10, 2025): @khorshuheng In the console: ``` Uncaught (in promise) Error: No workspace or service found ``` Over the network: ``` Record not found:Can't find the user profile for user: 131a6c51-[...]-bd4cfdf0e664 ```
Author
Owner

@timas130 commented on GitHub (Jul 10, 2025):

I have looked at the code for a bit, and what I found is that /api/user/verify/{access_token} doesn't get called, and this means verify_token doesn't get called, which is the only place where create_user is called, and so a user isn't created. Hope that helps.

<!-- gh-comment-id:3056953136 --> @timas130 commented on GitHub (Jul 10, 2025): I have looked at the code for a bit, and what I found is that [`/api/user/verify/{access_token}`](https://github.com/AppFlowy-IO/AppFlowy-Cloud/blob/main/src/api/user.rs#L24) doesn't get called, and this means [`verify_token`](https://github.com/AppFlowy-IO/AppFlowy-Cloud/blob/main/src/biz/user/user_verify.rs#L20) doesn't get called, which is the only place where [`create_user`](https://github.com/AppFlowy-IO/AppFlowy-Cloud/blob/main/libs/database/src/user.rs#L104) is called, and so a user isn't created. Hope that helps.
Author
Owner

@khorshuheng commented on GitHub (Jul 10, 2025):

Under normal circumstances, that should not happen - verify access token should always be called by AppFlowy web before logging in. One scenario that I am aware of, that this doesn't apply, is when old access token that corresponds to non existing users was still being stored on local storage. But that can be resolved by simply clearing all the site data.

I will see if I can find a way to make sure that the user profile is always created as long as a user sign up, rather than relying on the verify access token call.

<!-- gh-comment-id:3057213707 --> @khorshuheng commented on GitHub (Jul 10, 2025): Under normal circumstances, that should not happen - verify access token should always be called by AppFlowy web before logging in. One scenario that I am aware of, that this doesn't apply, is when old access token that corresponds to non existing users was still being stored on local storage. But that can be resolved by simply clearing all the site data. I will see if I can find a way to make sure that the user profile is always created as long as a user sign up, rather than relying on the verify access token call.
Author
Owner

@timas130 commented on GitHub (Jul 10, 2025):

Well /api/user/verify/.. is not actually called. Here what appears in the network tab when I sign in:

Image

I think that /api/user/verify/.. is only called from /auth/callback, which I'm not visiting as I'm not following the link from the email but rather entering the email code directly.

<!-- gh-comment-id:3057495652 --> @timas130 commented on GitHub (Jul 10, 2025): Well `/api/user/verify/..` is not actually called. Here what appears in the network tab when I sign in: <img width="2403" height="583" alt="Image" src="https://github.com/user-attachments/assets/7400f8d4-6719-41a6-961b-1f7c02ba2a63" /> I think that `/api/user/verify/..` is only called from `/auth/callback`, which I'm not visiting as I'm not following the link from the email but rather entering the email code directly.
Author
Owner

@khorshuheng commented on GitHub (Jul 10, 2025):

Yes, if verify access token endpoint has been called you wouldn't have faced this issue. What we need to find out on our end is why that isn't the case. Especially since we were able to sign up using a completely new account on our end using magic link and authentication code. I will need to retest this again.

<!-- gh-comment-id:3057511882 --> @khorshuheng commented on GitHub (Jul 10, 2025): Yes, if verify access token endpoint has been called you wouldn't have faced this issue. What we need to find out on our end is why that isn't the case. Especially since we were able to sign up using a completely new account on our end using magic link and authentication code. I will need to retest this again.
Author
Owner

@annieappflowy commented on GitHub (Sep 2, 2025):

@timas130 , let me know if the issue persists. Closing it for now.

<!-- gh-comment-id:3243769514 --> @annieappflowy commented on GitHub (Sep 2, 2025): @timas130 , let me know if the issue persists. Closing it for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#3566
No description provided.