You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Updates Radar.trackVerified() and RadarVerifiedDelegate.didUpdateToken() to return token: RadarVerifiedLocationToken, which includes user, events, token, expiresAt, expiresIn, and passed. Use token.passed to allow or deny access to app features, and optionally send token.token (a signed JWT) to your server to validate the signature.
Removes Radar.trackVerifiedToken(), since Radar.trackVerified() now returns a signed JWT.
Instead of calling Radar.trackVerified(), which always fetches a fresh location token, you can instead call Radar.getVerifiedLocationToken(), which returns a cached location token immediately if the last location token is still valid, or fetches a fresh location token if not.
You can also call Radar.startTrackingVerified() to fetch and cache location tokens in the background automatically on connection changes, on the specified interval, or more frequently if token.expiresIn < interval (based on current state, distance to border, and so on). If you set a delegate with Radar.setVerifiedDelegate(), location tokens are also delivered to RadarVerifiedDelegate.didUpdateToken().
Updates Radar.geocode() to accept optional layers and countries parameters.
Updates Radar.reverseGeocode() to accept an optional layers parameter.