ijsKoud / PaperPlane

An open-source customisable solution to storing files in the cloud. ✈️
https://paperplane.ijskoud.dev
MIT License
8 stars 2 forks source link

Can't login #78

Closed Mazeee1 closed 2 years ago

Mazeee1 commented 2 years ago

Hi. Whenever I try to login to the CDN, it won't accept my password (or username). I've tried both the password I set in the .env file and the one I set while setting up the user (because I don't know which one works).

I'm not the most experienced person in this, so I've probably just done something wrong.

image

ijsKoud commented 2 years ago

Oh, that’s a problem. Can you give me a screenshot of the .env file (excluding the password), as well as a screenshot of the console when you press the login button.

to access the console, you have to use: crtl + shift + i, from there press the arrow in the top right corner and click on console.

Mazeee1 commented 2 years ago

Here's my .env file: env file

The text that I've put a red border around comes up when I login: console

ijsKoud commented 2 years ago

Ah I see the problem, you forgot to add “https://” to your variable, you need to change the value of NEXT_PUBLIC_DOMAIN to “https://cdn.mazer800.xyz

don’t forget to restart your server after that

Mazeee1 commented 2 years ago

I've restarted my server then started the pm2 process but it still won't let me login. It looks like it's because of the same reason as well. I also created the user again.

ijsKoud commented 2 years ago

This is probably because you did not add the “--update-env” flag to it, if you don’t add it, it will not update the env variables

Mazeee1 commented 2 years ago

Ah, thanks. Should I put it on the outside or the inside of the quotation marks? Sorry if I'm being annoying

1 2

Note: I did it on the outside (see first image) and it didn't work. Haven't tried it on the inside yet

ijsKoud commented 2 years ago

Oh no I mean when restarting the application, instead of "pm2 restart " you have to use "pm2 restart --update-env". Sorry for the confusion

Mazeee1 commented 2 years ago

Ah, thanks. So I did that and it seems like it made the error in the console go away but it still won't work. When I put in the correct password it comes up with error 500, but when I put in an incorrect password it comes up with 404. Odd

image

ijsKoud commented 2 years ago

Hmmm, weird. Can you show me the pm2 logs?

Mazeee1 commented 2 years ago

This seems to come up whenever I put my password in. image

ijsKoud commented 2 years ago

Your Encryption key is too big, how many characters did you use?

Mazeee1 commented 2 years ago
  1. I'll shorten it.
ijsKoud commented 2 years ago

16 should be fine, try 8 and see if that works

Mazeee1 commented 2 years ago

Changed it and restarted the pm2 but it still comes up with that error.

Mazeee1 commented 2 years ago

I don't mind starting again, and rebuilding my vps since there's nothing important on there. I won't do it if it's not necessary though.

ijsKoud commented 2 years ago

I don't think it is necessary, can you re-generate one at: https://passwordsgenerator.net/plus/ using the following configuration:

Mazeee1 commented 2 years ago

That worked. Thanks so much :)

ijsKoud commented 2 years ago

Amazing! I will make sure to document this issue so that everyone can use PaperPlane without problems.

Mazeee1 commented 2 years ago

That's great.