Authentication
Server address
Section titled “Server address”Before using the SDK, point both the SDK and the service client to the Prove ID environment:
import RKYC_iOSimport ProveIDApiClient
let serverUrl = "https://test.api.proveid.io" // test// let serverUrl = "https://api.proveid.io" // production
EndpointManager.SERVER_URL = serverUrlProveIDApiClientAPI.basePath = serverUrlDo this once when the app starts, for example in application(_:didFinishLaunchingWithOptions:).
Access token
Section titled “Access token”Every ProveIDApiClient call sends the headers in ProveIDApiClientAPI.customHeaders. Set the access token there:
ProveIDApiClientAPI.customHeaders["Authorization"] = "Bearer \(accessToken)"The recommended setup, as with the Web SDK, is to obtain the access token on your server and hand it to the app as a short-lived token. When it expires, get a new one from your server and set the header again.