Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Allow usage of multiple access tokens #13311

Closed
langsmith opened this issue Nov 7, 2018 · 6 comments
Closed

Allow usage of multiple access tokens #13311

langsmith opened this issue Nov 7, 2018 · 6 comments
Labels
iOS Mapbox Maps SDK for iOS

Comments

@langsmith
Copy link
Contributor

It would be nice to add more flexibility to token management in the Maps SDKs for Android and iOS. More specifically, the ability to switch tokens in order to use multiple Mapbox products with one another.

The current use case that this could solve is using China .cn products with .com products. Mapbox China map styles require a special China access token, but a China token can't load a global style such as Satellite Streets. I'd like to be able to load the China tiles with a China access token and then use a global/.com access token to load Satellite Streets when I click a toggle style button. Right now, the Mapbox singleton object will continue to use the China token for all API calls because that was the first token used.

cc @chriswu42 @suntony @springmeyer @Chaoba @lloydsheng @jmkiley

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Nov 8, 2018
@tobrun
Copy link
Member

tobrun commented Nov 8, 2018

Adding this to 7.0 as this could potentially impact public API

@tobrun tobrun added this to the android-v7.0.0 milestone Nov 8, 2018
@zugaldia zugaldia added the SEMVER-MAJOR Requires a major release according to Semantic Versioning rules label Nov 15, 2018
@springmeyer
Copy link
Contributor

in the Maps SDKs for Android and iOS.

Re-opening: Is there a plan for iOS? My opinion is that we need parity for this feature to be viable.

@springmeyer springmeyer reopened this Dec 6, 2018
@tobrun
Copy link
Member

tobrun commented Dec 6, 2018

Updating the labels to reflect above

@tobrun tobrun removed this from the android-v7.0.0-iowaska milestone Dec 6, 2018
@tobrun tobrun added iOS Mapbox Maps SDK for iOS and removed Android Mapbox Maps SDK for Android SEMVER-MAJOR Requires a major release according to Semantic Versioning rules labels Dec 6, 2018
@jmkiley
Copy link
Contributor

jmkiley commented Dec 11, 2018

On the iOS side, accessToken is already exposed and can be set programmatically. However, I'm not sure about how this behaves with multiple access tokens. Will investigate.

@jmkiley
Copy link
Contributor

jmkiley commented Dec 18, 2018

👋 Looks like this already works on iOS. However, we do run into an obstacle with switching the MGLMapboxAPIBaseURL, since that is set in the Info.plist. I have opened a ticket to discuss this feature: #13605

@tobrun
Copy link
Member

tobrun commented Dec 19, 2018

since iOS is covered on this feature request and we have ticketed out tail work. Going to close this one out.

@tobrun tobrun closed this as completed Dec 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

5 participants