Create Apple Developer Account

  • Click on “Account” in the top menu.
  • Create a new Apple Developer account if you don’t have one already and sign in to the Apple Developer platform.

Get an App ID

  • Go to the Apple Developer Dashboard.

  • Click on Certificates, IDs & Profiles in the left menu.

  • Click on Identifiers in the left menu.

  • Click on the ”+” button in the header next to “Identifiers”.

  • Select App IDs and click Continue.

  • Select type App and click Continue.

  • Fill in the App information:

    • Description.
    • Bundle ID (ex. io.nhost.app or com.your-startup.app).
    • Scroll down and check Sign In With Apple.
    • Click Continue in the top right corner.
    • Click Register in the top right corner.
  • Click on the newly created app to see Team ID.

  • Team ID: Copy and paste the Team ID to your Nhost OAuth settings for Apple.

Get a Service ID

  • Go to the Apple Developer Dashboard.

  • Click on Certificates, IDs & Profiles in the left menu.

  • Click on Identifiers in the left menu.

  • Click on Certificates, IDs & Profiles in the left menu.

  • Click on Identifiers in the left menu.

  • Click on the ”+” button in the header next to “Identifiers”.

  • Select Service IDs and click Continue.

  • Fill in the Service information:

    • Description.
    • Identifier (Service ID) (ex. service.io.nhost.app or service.com.your-startup.app). Notice you can’t use the same identifier as for the app so we recommend adding “service” at the beginning if the identifier.
    • Service ID: Copy and paste the Identifier (Service ID) to your Nhost OAuth settings for Apple.
    • Click Continue in the top right corner.
    • Click Register in the top right corner.
  • Click on the newly created service in the list of Identifiers.

  • Click the checkbox to enable “Sign in with Apple”.

  • Click Configure next to “Sign in with Apple”.

  • Make sure your newly created Bundle ID is selected under Primary App ID.

  • Add your base auth domain under “Domains and Subdomains”. E.g. <subdomain>.auth.<region>.nhost.run.

  • Add the full callback URL under “Return URLs”. E.g. https://<subdomain>.auth.<region>.nhost.run/v1/signin/provider/apple/callback.

  • Click Next.

  • Click Done.

  • Click Continue in the top right corner.

  • Click Save in the top right corner.

Generate Key

  • Go to the Apple Developer Dashboard.
  • Click on Certificates, IDs & Profiles in the left menu.
  • Click on Keys in the left menu.
  • Click on Create a key.
  • Fill in a name for your key.
  • Click the checkbox to enable “Sign in with Apple”.
  • Click Configure next to “Sign in with Apple”.
  • Select your newly created App ID in the dropdown selector.
  • Click Save in the top right corner.
  • Click Continue in the top right corner.
  • Click Register in the top right corner.
  • Key ID: Copy and paste the Key ID to your Nhost OAuth settings for Apple.
  • Click Download to download the key to your computer.
  • Private Key: Copy and paste the content of the downloaded key to your Nhost OAuth settings for Apple.

Sign In Users

Use the Nhost JavaScript client to sign in users:

nhost.auth.signIn({
  provider: 'apple'
})

To use your own domain for the callback URL refer to the custom domains documentation.