[GH-ISSUE #1361] Allow login to web app with token #960

Open
opened 2026-05-07 00:29:07 +02:00 by BreizhHardware · 7 comments

Originally created by @helmut72 on GitHub (Jun 1, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1361

💡 Idea
While using other web apps, where I have installed them to my homescreen, I never need to login again even when not using them for weeks. But ntfy force me to login after 3-4 days.

Would be cool to be able to modify expire time of tokens of this sessions or being able to login with token instead of password to the web app.

Thank you.

Originally created by @helmut72 on GitHub (Jun 1, 2025). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1361 :bulb: **Idea** While using other web apps, where I have installed them to my homescreen, I never need to login again even when not using them for weeks. But ntfy force me to login after 3-4 days. Would be cool to be able to modify expire time of tokens of this sessions or being able to login with token instead of password to the web app. Thank you.
Author
Owner

@audstanley commented on GitHub (Jun 7, 2025):

I'm not on the dev team - but i don't follow. I've installed ntfy as a Progressive Web App (PWA) using firefox and a firefox extension. I'm pretty sure my login is stored in the web application, and no token is needed - are you clearing your browser cache?

<!-- gh-comment-id:2951430175 --> @audstanley commented on GitHub (Jun 7, 2025): I'm not on the dev team - but i don't follow. I've installed ntfy as a Progressive Web App (PWA) using firefox and a firefox extension. I'm pretty sure my login is stored in the web application, and no token is needed - are you clearing your browser cache?
Author
Owner

@anoniuuiti commented on GitHub (Sep 7, 2025):

@helmut72 I get an idea but not entirely sure whether it works 100% correct.
Login PWA using user name and pw ==> observe token for current PWA session ==> manually create token via config file w/ same token observed ==> restart ntfy instance ==> that token created would come w/ "Never Expire" session.

<!-- gh-comment-id:3263524610 --> @anoniuuiti commented on GitHub (Sep 7, 2025): @helmut72 I get an idea but not entirely sure whether it works 100% correct. Login PWA using user name and pw ==> observe token for current PWA session ==> manually create token via config file w/ same token observed ==> restart ntfy instance ==> that token created would come w/ "Never Expire" session.
Author
Owner

@helmut72 commented on GitHub (Sep 8, 2025):

I'm not on the dev team - but i don't follow. I've installed ntfy as a Progressive Web App (PWA) using firefox and a firefox extension. I'm pretty sure my login is stored in the web application, and no token is needed - are you clearing your browser cache?

I'm not clearing any browser cache. Do you have tried it on a mobile phone, Safari on iPhone, Samsung Internet on a Samsung Android phone or any other mobile device with a browser, that supports webpush? After a few days, session is invalid, never get any push messages and need to login again.

Using a desktop browser is more or less useless, because I want to be especially notified when not in front of a PC. Also I don't want to be flooded with messages and it's possible, that I don't get ones for several days.

<!-- gh-comment-id:3265073945 --> @helmut72 commented on GitHub (Sep 8, 2025): > I'm not on the dev team - but i don't follow. I've installed ntfy as a Progressive Web App (PWA) using firefox and a firefox extension. I'm pretty sure my login is stored in the web application, and no token is needed - are you clearing your browser cache? I'm not clearing any browser cache. Do you have tried it on a mobile phone, Safari on iPhone, Samsung Internet on a Samsung Android phone or any other mobile device with a browser, that supports webpush? After a few days, session is invalid, never get any push messages and need to login again. Using a desktop browser is more or less useless, because I want to be especially notified when not in front of a PC. Also I don't want to be flooded with messages and it's possible, that I don't get ones for several days.
Author
Owner

@helmut72 commented on GitHub (Sep 8, 2025):

@helmut72 I get an idea but not entirely sure whether it works 100% correct. Login PWA using user name and pw ==> observe token for current PWA session ==> manually create token via config file w/ same token observed ==> restart ntfy instance ==> that token created would come w/ "Never Expire" session.

There will be random tokens generated. Only description can be edited.

<!-- gh-comment-id:3265097750 --> @helmut72 commented on GitHub (Sep 8, 2025): > [@helmut72](https://github.com/helmut72) I get an idea but not entirely sure whether it works 100% correct. Login PWA using user name and pw ==> observe token for current PWA session ==> manually create token via config file w/ same token observed ==> restart ntfy instance ==> that token created would come w/ "Never Expire" session. There will be random tokens generated. Only description can be edited.
Author
Owner

@anoniuuiti commented on GitHub (Sep 8, 2025):

@helmut72 I get an idea but not entirely sure whether it works 100% correct. Login PWA using user name and pw ==> observe token for current PWA session ==> manually create token via config file w/ same token observed ==> restart ntfy instance ==> that token created would come w/ "Never Expire" session.

There will be random tokens generated. Only description can be edited.

https://docs.ntfy.sh/config/#tokens-via-the-config
I guess you can take a look at this. The token part should be capable of being manually edited.

<!-- gh-comment-id:3265325100 --> @anoniuuiti commented on GitHub (Sep 8, 2025): > > [@helmut72](https://github.com/helmut72) I get an idea but not entirely sure whether it works 100% correct. Login PWA using user name and pw ==> observe token for current PWA session ==> manually create token via config file w/ same token observed ==> restart ntfy instance ==> that token created would come w/ "Never Expire" session. > > There will be random tokens generated. Only description can be edited. https://docs.ntfy.sh/config/#tokens-via-the-config I guess you can take a look at this. The token part should be capable of being manually edited.
Author
Owner

@helmut72 commented on GitHub (Sep 9, 2025):

@anoniuuiti Now I know what you mean. I've added this, now it reads never expire and will test it after few days. Thanks. But even if this works, it's a crazy workaround ;)

<!-- gh-comment-id:3269486812 --> @helmut72 commented on GitHub (Sep 9, 2025): @anoniuuiti Now I know what you mean. I've added this, now it reads never expire and will test it after few days. Thanks. But even if this works, it's a crazy workaround ;)
Author
Owner

@helmut72 commented on GitHub (Sep 25, 2025):

@anoniuuiti Tried it today and it even works after this many days!! Received the push message and no need to login on Android and iOS :)

It would be cool not to use this crazy workaround and just set to "never expires" from the webui or have "never expires" as a default setting for every token.

<!-- gh-comment-id:3332382061 --> @helmut72 commented on GitHub (Sep 25, 2025): @anoniuuiti Tried it today and it even works after this many days!! Received the push message and no need to login on Android and iOS :) It would be cool not to use this crazy workaround and just set to "never expires" from the webui or have "never expires" as a default setting for every token.
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
starred/ntfy#960
No description provided.