fix: refreshing tokens at the wrong time (#55) fix: refreshing tokens at the wrong time StoredSession.isValid was being calculated incorrectly, because by comparing to “1 minute ago”, it means an access token which expires “30 seconds ago” is still valid for 30 seconds. Changing to plus 60 seconds eliminates this problem, and bakes in plenty of time for latency issues. In a future evolution I believe this value should be configurable. configurable refresh tolerance Revert “configurable refresh tolerance” This reverts commit 942acce3e534a508fa8483f17c71d11e459ef587.
fix: refreshing tokens at the wrong time (#55)
StoredSession.isValid was being calculated incorrectly, because by comparing to “1 minute ago”, it means an access token which expires “30 seconds ago” is still valid for 30 seconds. Changing to plus 60 seconds eliminates this problem, and bakes in plenty of time for latency issues.
In a future evolution I believe this value should be configurable.
configurable refresh tolerance
Revert “configurable refresh tolerance”
This reverts commit 942acce3e534a508fa8483f17c71d11e459ef587.
gotrue-swift
Swift client for the GoTrue API.
The usage should be the same as gotrue-js except:
Oauth2:
signIn
session(from url: URL)
For running the examples project you’ll have to provide your own Supabase project.
$ cp Examples/Shared/Sources/_Secrets.swift Examples/Shared/Sources/Secrets.swift $ Examples/Shared/Sources/Secrets.swift # Or use you favorite editor
Replace {PROJECT_ID} and {ANON_KEY} with real values for your project on the Supabase portal.
{PROJECT_ID}
{ANON_KEY}
Check Examples for example usages.
This repo is licensed under MIT.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
gotrue-swift
Swift client for the GoTrue API.
Using
The usage should be the same as gotrue-js except:
Oauth2:
signIn
with OAuth2 provider only return provider url. Users have to launch that url to continue the auth flow.session(from url: URL)
to parse session data.Running Examples
For running the examples project you’ll have to provide your own Supabase project.
Replace
{PROJECT_ID}
and{ANON_KEY}
with real values for your project on the Supabase portal.Check Examples for example usages.
Contributing
License
This repo is licensed under MIT.
Credits