AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] Can't login with email

Open virtualfuzz opened this issue 1 year ago • 8 comments

Bug Description

When I try to login with an email, I receive a link in my email, I click on it, it opens AppFlowy but it doesn't log me in.

How to Reproduce

Try to login on Windows/Linux(NixOS) and it won't work. Doesn't happen on Android.

Expected Behavior

That I am able to login.

Operating System

Windows 10/NixOS 24.11

AppFlowy Version(s)

On Windows it was 0.6.7.2, on NixOS it was 0.6.6

Screenshots

Bildschirmfoto_20240829_133316 For some reason when I try to log in using the link a small bar appears on the bottom of the application.

Additional Context

No response

virtualfuzz avatar Aug 29 '24 11:08 virtualfuzz

Hey, I am sorry to hear you're having trouble signing in.

You mention a small bar showing at the bottom, but it's not included in the picture, can you share what it says?

Would it be possible for you to send me your log files at [email protected] - or in a DM on Discord?

You can find out how to find your log files here: https://appflowy.com/a1b45051-39f5-469b-88da-d008ef40bc5a/AppFlowy-Q-A-efd81847-90da-4ca7-af28-9e7491c2d9ea


Note: You can use the anonymous sign-in option to get access to the settings page to quickly find the location of your AppFlowy Data.

Xazin avatar Aug 29 '24 11:08 Xazin

@Ash882

if you are using home manger, add this to your home.nix, replace path/to/appflowy with some script to open it up or binary (if you download it)

{ config, pkgs, ... }:

{

  xdg.mimeApps = {
    enable = true;
    associations.added = {
      "x-scheme-handler/appflowy-flutter" = [ "appflowy-flutter.desktop" ];
    };
    defaultApplications = {
      "x-scheme-handler/appflowy-flutter" = [ "appflowy-flutter.desktop" ];
    };
  };

  xdg.desktopEntries = {
    appflowy-flutter = {
      name = "Appflowy Flutter";
      exec = "<path/to/appflowy> %U";
      terminal = false;
      categories = [ "Application" ];
      mimeType = [ "x-scheme-handler/appflowy-flutter" ];
    };
  };

  ... 

}

speed2exe avatar Aug 29 '24 12:08 speed2exe

Thanks for the logs by the way, I read through them and could not find anything crucial.

The error on Windows was that the link was expired, meaning the token could no longer be used. I'm unsure about the validity of the error, as you know best yourself how long it took from email sent till the link was pressed and the application opened as a result. I believe it has a lifetime of 5 minutes, so if the time passed you would have to request a new login link.

As for the Linux logs, there was no log signaling the deep link connection, I believe that can be a result of the application not being configured properly, if you're not using the .deb or .rpm, you will have to configure the deep link yourself. Refer to @speed2exe 's message above if you're using Home Manager.

Xazin avatar Aug 29 '24 20:08 Xazin

For the Windows thing, I found out that for some reason, when I was opening the link though my email, it wouldn't open the app and I had to reload the URL, which made the link expire since I tried to use it twice.

I was able to login in windows by copying the link and then pasting it the URL bar, which made appflowy open and login successfully.

Im still trying to find out what the Linux issue is but it might be related to the mimeApps thing.

EDIT: Don't think it's related to it because when I use the link I receive though my email it opens the app but doesn't login. I've also checked my .config/mimeapps.list and AppFlowy was there and setup properly.

x-scheme-handler/appflowy-flutter=appflowy.desktop

virtualfuzz avatar Aug 29 '24 20:08 virtualfuzz

When starting the app from the command line I also get this error that didn't show up in the logs: ** (AppFlowy:57095): CRITICAL **: 11:53:52.997: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

Maybe it's related to that?

I'm using the AppFlowy from the NixOS unstable repo.

virtualfuzz avatar Aug 30 '24 09:08 virtualfuzz

Magic link email doesn't contains any email or button. appflowy

arafth avatar Sep 19 '24 05:09 arafth

@arafth there might be some issues displaying in your mail client. have you tried to view it in a web browser? try clicking the message in the banner to view it in a we browser.

speed2exe avatar Sep 19 '24 05:09 speed2exe

Display in browser also not working. But once I opened with another email client it works. Note that, login email content doesn't render well in outlook.

arafth avatar Sep 19 '24 07:09 arafth

image I encountered some similar or similar problems. I could not log in normally. If I directly used the login shortcut buttons such as Google and GitHub, the abnormality in the picture would be reported. If I used the magic link to log in, entered the email, and clicked send, the mailbox would never receive any relevant emails.

richardy2012 avatar Nov 05 '24 08:11 richardy2012

@richardy2012 I'd assume you are not self-hosting. Have you check the spam messages in your inbox?

speed2exe avatar Nov 05 '24 11:11 speed2exe

Just noting that the URL from the email is still broken for me on NixOS. Firefox won't open it at all, in Chrome I get an xdg error

Could not read file appflowy-flutter://#access_token=...ires_in=604800&refresh_token=...&token_type=bearer&type=magiclink.

since the app, for some reason, has no way to paste the OTP it renders the app unusable for me. I'm not using any home manager at the moment, the app should be working without it.

leon-thomm avatar Jun 07 '25 06:06 leon-thomm

Which version of the desktop app are you using? Enter OTP is only available on the newer versions.

khorshuheng avatar Jun 07 '25 07:06 khorshuheng

I was running on 0.8.8, on 0.9.1 I can enter the OTP. After restarting the app (it gets stuck at Verifying...) I am logged in 👍

leon-thomm avatar Jun 07 '25 08:06 leon-thomm