21af65b10012f23e53dba9d01fd2474fcb810f7c
A leftover of what I assume was the v1 API behaviour handling manually multiplied the `expires` values by 1,000, supposedly to make it a millisecond value. However, AL tokens have been saved as milliseconds since at least the v2 API implementation in 2018, so this has made every expiry comparison ludicrously impossible. Example: millisecond timestamp: 1788529931115 (2026-09-04T13:52:11.115Z) *1,000 1788529931115000 (+58646-04-04T21:45:15Z) So any expiry comparisons would say "yes this token is still totally valid", causing Mihon to send expired credentials and AL to respond with a 401. With these changes (which include some loosely associated clean-up), we now correctly identify expired credentials before we attempt any AL requests & actually show a toast with the "Token expired." error message for the first time in 8 years or so? I was able to keep the new ALOAuth shape compatible with already-serialized data, though whenever a user (re-)links AL from now on, both the `token_type` and `expiresIn` fields won't exist any more. Since they had no use in the current code anyway, I don't consider this a problem. I took the liberty of adding basic instructions to the error message but these can't be i18n'd properly so I kept it short and sweet. --- Side effect of expired credentials is Mihon erasing the token in storage, meaning AL disappears from the tracker sheet until re-linked. I would say this is acceptable, but we might see panicked users in support saying "Mihon deleted my AL links" or something.
Mihon App
Full-featured reader
Discover and read manga, webtoons, comics, and more – easier than ever on your Android device.
Download
Requires Android 8.0 or higher.
Features
- Local reading of content.
- A configurable reader with multiple viewers, reading directions and other settings.
- Tracker support: MangaBaka, MyAnimeList, AniList, Kitsu, MangaUpdates, Shikimori, Bangumi, and Hikka support.
- Categories to organize your library.
- Light and dark themes.
- Schedule updating your library for new chapters.
- Create backups locally to read offline or to your desired cloud service.
- Plus much more...
Contributing
Code of conduct · Contributing guide
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Before reporting a new issue, take a look at the FAQ, the changelog and the already opened issues; if you got any questions, join our Discord server.
Repositories
Credits
Thank you to all the people who have contributed!
Disclaimer
The developer(s) of this application does not have any affiliation with the content providers available, and this application hosts zero content.
License
Copyright © 2015 Javier Tomás Copyright © 2024 Mihon Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Description
Releases
2
test release 2
Latest
Languages
Kotlin
100%