Custom auth mobile

Mobile sample uses anonymous by default; switch to customAuth to bring your own login.

Source on GitHub: examples/todo/mobile (Expo + JavaScript).

By default it uses authMode: "anonymous". To use your own auth instead (skip anonymous identity, keep App Attest / Play Integrity):

createReactNativeSecureLink({
  baseUrl: "http://127.0.0.1:8787",
  authMode: "customAuth",
  nativePlatform: "ios",
  attestationEnabled: true,
  authorization: {
    async getAuthorization() {
      return { authorization: `Bearer ${await myLoginToken()}`, scheme: "custom" };
    },
  },
});

Run:

pnpm --filter @securelink/todo-server start
pnpm --filter @securelink/todo-mobile start

Download: Todo example apps · GitHub