Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 9710085

Browse files
committed
Fixes an issue where access token would get invalidated when there was no network available
1 parent 2be9e37 commit 9710085

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

CedarMapsSDK/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'signing'
33
apply plugin: 'com.github.dcendents.android-maven'
44

55
group = "com.cedarmaps"
6-
version = "4.0.1"
6+
version = "4.0.2"
77
def siteUrl = 'http://cedarmaps.com'
88
def gitUrl = 'http://cedarmaps.com/git'
99

CedarMapsSDK/src/main/java/com/cedarstudios/cedarmapssdk/AuthenticationManager.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,9 @@ void generateAccessToken() {
156156
return;
157157
}
158158
isFetchingNewAccessToken = true;
159-
invalidateCredentials();
160159

161160
if (Mapbox.getAccessToken() == null) {
162161
Mapbox.getInstance(mContext, INITIAL_TOKEN);
163-
} else {
164-
Mapbox.setAccessToken(INITIAL_TOKEN);
165162
}
166163

167164
try {
@@ -294,6 +291,7 @@ public void run() {
294291
});
295292
}
296293
} else if (response.code() == 401) {
294+
invalidateCredentials();
297295
handler.post(new Runnable() {
298296
@Override
299297
public void run() {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Then, add this to the `build.gradle` of your **app** module:
3838

3939
```groovy
4040
dependencies {
41-
implementation 'com.cedarmaps:CedarMapsSDK:4.0.1'
41+
implementation 'com.cedarmaps:CedarMapsSDK:4.0.2'
4242
}
4343
```
4444

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.cedarmaps
2-
VERSION_NAME=4.0.1
2+
VERSION_NAME=4.0.2
33

44
# Project-wide Gradle settings.
55

0 commit comments

Comments
 (0)