Android OKHttp Interceptor Extension (Optional)
The Authgear Android SDK provides an optional
Okhttpinterceptor which handles everything from refreshing the access token to putting the access token in the header.
The extension is included in the SDK. Please refer to the above section for getting the SDK.
Authgear authgear = // Obtain the authgear instance.
OKHttpClient client = new OkHttpClient.Builder()
The client would then include the access token in every request and refresh the access token when necessary before the requests.