Skip to content

Commit

Permalink
use fromToken() for oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
newmanw committed Oct 8, 2024
1 parent ef150cd commit ef70043
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugins/arcgis/service/src/FeatureService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,10 @@ export async function getIdentityManager(
const portal = getPortalUrl(featureService)
const { clientId, authToken, authTokenExpires, refreshToken, refreshTokenExpires } = featureService.auth
if (authToken && new Date(authTokenExpires || 0) > new Date()) {
return new ArcGISIdentityManager({
return ArcGISIdentityManager.fromToken({
clientId: clientId,
token: authToken,
tokenExpires: new Date(authTokenExpires || 0),
refreshToken: refreshToken,
refreshTokenExpires: new Date(refreshTokenExpires || 0),
portal: getPortalUrl(featureService),
server: getServerUrl(featureService)
})
Expand Down

0 comments on commit ef70043

Please sign in to comment.