Can I trigger an OAuth authentication flow without presenting the map?
I found this in the Samples code you provide: https://github.com/Esri/arcgis-maps-sdk-swift-samples/blob/main/Shared/Samples/Authenticate%20with%2...
But here, it is attached to the displayed map. I would need a solution that when our application starts - before rendering our Map component at all - we start the authentication flow with the built-in handling.
Is it possible? Thanks.
Solved! Go to Solution.
Seems I overlooked the migration guide from 100.x to 200.x as there is a solution for it: https://developers.arcgis.com/swift/reference/migrate-authentication-100-x-to-200-x/
More precisely, this:
// OAuth user credential
let configuration = OAuthUserConfiguration(portalURL: portalURL, clientID: clientID, redirectURL: redirectURL)
let oAuthUserCredential = try await OAuthUserCredential.credential(for: configuration)
Seems I overlooked the migration guide from 100.x to 200.x as there is a solution for it: https://developers.arcgis.com/swift/reference/migrate-authentication-100-x-to-200-x/
More precisely, this:
// OAuth user credential
let configuration = OAuthUserConfiguration(portalURL: portalURL, clientID: clientID, redirectURL: redirectURL)
let oAuthUserCredential = try await OAuthUserCredential.credential(for: configuration)