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

Can't login with an error #94

Closed
neroti9n opened this issue Nov 28, 2022 · 14 comments
Closed

Can't login with an error #94

neroti9n opened this issue Nov 28, 2022 · 14 comments

Comments

@neroti9n
Copy link

neroti9n commented Nov 28, 2022

hello, i get an error when i was logining
image
image

@frysztak
Copy link
Owner

hey @neroti9n, are you using HTTPS?

@neroti9n
Copy link
Author

Not yet...maybe this is the crux of the problem...so i can't use it through NOT HTTPS?

@frysztak
Copy link
Owner

in general you should be able not to use HTTPS, but I missed the fact that Cache API is not available in non-secure contexts. I'll prepare patch release with a fix right now

@frysztak
Copy link
Owner

@neroti9n this should be fixed in v0.9.1. please pull newest image and try logging in again

@neroti9n
Copy link
Author

thanks~

@neroti9n
Copy link
Author

i have updated to the newest image, it didn' t show last error, but api returned http errorcode 401 Unauthorized

@frysztak
Copy link
Owner

I'll later setup env without HTTPS to debug this

@frysztak
Copy link
Owner

@neroti9n can you try adding environmental variable DISABLE_SECURE_COOKIE=true? following sample docker-compose.template.yml:

version: '3'
services:
  orpington-news:
    image: ghcr.io/frysztak/orpington-news-api:latest
    container_name: orpington-news
    environment:
      - APP_URL=https://news.my.domain # please change to your actual domain
      - DB_HOST=orpington-news-postgres
      - DB_PASS=dbpass # same pass like `POSTGRES_PASSWORD` below
      - COOKIE_SECRET=<generate unique cookie secret, for details see README>
      - DISABLE_SECURE_COOKIE=true
      # ^^ that's the line
    networks:
      - orpington-news
    restart: always

  orpington-news-postgres:
    image: postgres:14-alpine
    container_name: orpington-news-postgres
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=dbpass
    volumes:
      - <local directory>:/var/lib/postgresql/data
    networks:
      - orpington-news
    restart: always

networks:
  orpington-news:

@neroti9n
Copy link
Author

I logged in my account successfully, thank u very much~
^^there are some small tips to make it better
1、mark unread/read in different colors or signs to distinguish them
2、it could add a Favourits folder putting in some worth re-reading articals
3、it didn't display suitable size on my phone at first time, i swithed the layout, then seems to be normal, at the first time,it will display the scroll in the bottom that makes page move left and right

@frysztak
Copy link
Owner

glad it worked 🎊. sorry it took so much effort - I kind of assumed everyone will use HTTPS from the start. I'll try to add a note in readme about it

and thanks for the tips! some kind of Favourites folder is on my TODO list from the very beginning. I'm curious about the third one - can you share your phone model and browser?

@neroti9n
Copy link
Author

iphone12 & safari...other browsers seem like also have the same problem

I find another pagination problem, when I scroll down to the bottom in the collection list, the upper items will become the same and can't be recovered

@frysztak
Copy link
Owner

frysztak commented Nov 30, 2022

other browsers seem like also have the same problem

because of Apple policy all browsers on iOS use WebKit

truth be told, I haven't done any testing on iOS devices because I don't own any. but I'll try to line something up. many thanks for the feedback, I really appreciate it

@neroti9n
Copy link
Author

neroti9n commented Dec 1, 2022

As a web developer, too, I don't even know the security policy different between https and http without google search, and browsers on ios all use Webkit...lol..learned~

What's the brand of your phone? Samsung or Xiaomi or Sony or ...I'm just curious whether our country's brand have a good sale in your place^^

@frysztak
Copy link
Owner

frysztak commented Dec 4, 2022

@neroti9n I use a Motorola.
I couldn't reproduce those iOS issues you mentioned - could you open a new bug report with screenshots/video?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants