Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to authenticate with Reddit #2

Closed
rickcecil opened this issue Sep 11, 2022 · 2 comments
Closed

Unable to authenticate with Reddit #2

rickcecil opened this issue Sep 11, 2022 · 2 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@rickcecil
Copy link

Super excited to try this out! Thanks for making this happen! I have, though, run into a setup issue...

  1. Visit https://local.domain.com/
  2. Click Login with Reddit
  3. Click allow from Reddit
  4. Returned to https://local.domain.com/logout#_

Some notes on my configuration

  • My user is in the approved list in the .env_prod file.
  • I am using a subdomain on a domain that I own that is proxied through Nginx Proxy Manager, which is also listed in the config file for the callback URL and is used on Reddit as the callback URL. This domain name is not accessible to the external network.

I am seeing the following in the logs

From the database:

2022-09-11 20:50:17.781 UTC [69] LOG:  incomplete startup packet,
2022-09-11 20:50:17.450 UTC [1] LOG:  database system is ready to accept connections,
2022-09-11 20:50:17.446 UTC [62] LOG:  database system was shut down at 2022-09-11 20:50:17 UTC,
2022-09-11 20:50:17.440 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432",
2022-09-11 20:50:17.437 UTC [1] LOG:  listening on IPv6 address "::", port 5432,
2022-09-11 20:50:17.437 UTC [1] LOG:  starting PostgreSQL 14.5 (Debian 14.5-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit,
2022-09-11 20:50:17.437 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432

From the app:

server (expanse) started on (localhost:1301)
saved user (reddituser),
checking if user (reddituser) exists,
purged user (reddituser),
denied user (reddituser),
socket (WDZoBrdZVFDhSc-1AAAL) connected,
new user (reddituser),
socket (tk5NIOso-aftuQw4AAAJ) connected,

I've tried to figure out where localhost:1301 is being set, but can't find it. I have found that that can cause issues if it doesn't match the domain that I a using on the network. It is updated in the .env_prod file. This may not be related to this particular issue, but thought it wroth mentioning.

Let me know what other questions you have. At the moment, this is all the info that I can find on the issue. And I fully recognize that this very well could be a pebkac errror. Any help is greatly appreciated.

@jc9108
Copy link
Owner

jc9108 commented Sep 11, 2022

i am not really sure how to debug users' network errors or configs (if that is the issue here as with #1) as i am not too versed in that field unfortunately. can i ask that you try it on localhost with the default redirect uri first to confirm that it's working or not? so that we can tell if it's an issue with expanse or otherwise. though since it runs in docker and ive tested it without issue i suspect it is not. after that, you are on your own as for how you host it publicly


Returned to https://local.domain.com/logout#_

when i tested, this happens if the redirect uri is not the same in the app at https://www.reddit.com/prefs/apps and in the env file

I am using a subdomain on a domain that I own that is proxied through Nginx Proxy Manager, which is also listed in the config file for the callback URL and is used on Reddit as the callback URL. This domain name is not accessible to the external network

the redirect uri must always end in "/callback", in case you just put the (sub)domain by itself


the logs for the db are normal. the other logs say that your user got denied. can you paste the allowed and denied lists of your env file (with sensitive info substituted) here?

@rickcecil
Copy link
Author

So, I think I figured it out.

It was the ALLOWED_USERS list. I did not have a space between the two user IDs like so:

ALLOWED_USERS="user1,user2"

Pfft.

Excited to test it out, now!

@jc9108 jc9108 added question Further information is requested invalid This doesn't seem right labels Sep 12, 2022
@jc9108 jc9108 mentioned this issue Sep 14, 2022
@jc9108 jc9108 added bug Something isn't working invalid This doesn't seem right and removed invalid This doesn't seem right question Further information is requested labels Sep 14, 2022
@jc9108 jc9108 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants