webAuthenticationCallbackRoute method

Route webAuthenticationCallbackRoute()

Route for handling callbacks during authentication with AppleIdp on foreign platforms such as Web, Android, etc, as opposed to iOS and macOS.

To be mounted as a POST handler under the URL configured in Apple's developer portal, for example:

 pod.webServer.addRoute(
   appleIdp.webAuthenticationCallbackRoute(),
   '/auth/apple/callback',
);

For Android clients, this route will redirect to the app using an Android intent URI with the signinwithapple scheme. This requires the androidPackageIdentifier to be configured in AppleIdpConfig.

For Web clients, this route redirects to the configured webRedirectUri while forwarding the callback parameters in the query string. This requires webRedirectUri to be configured in AppleIdpConfig.

Implementation

Route webAuthenticationCallbackRoute() => AppleWebAuthenticationCallbackRoute(
  utils: utils,
  androidPackageIdentifier: config.androidPackageIdentifier,
  webRedirectUri: config.webRedirectUri,
);