{CODICTS} Snippets is now available

MyListing Apple Sign In

The {CODICTS} MyListing Apple Sign In plugin adds Sign in with Apple functionality to your MyListing site’s login and registration forms. Users can authenticate with their Apple ID using a popup-based flow — no full-page redirects required.

The plugin automatically injects a styled “Sign in with Apple” button into MyListing’s login containers. It handles the complete authentication process: opening the Apple Sign-In popup, verifying the authorization server-side with Apple, and either logging in an existing user or creating a new WordPress account.

Requirements

A paid Apple Developer Program membership ($99/year)

Installation & Activation

Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.

After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.

After activation, navigate to Apple Sign In in the admin sidebar to configure your Apple Developer credentials before the button will appear on your site.


Key Features

FeatureDescription
Apple Sign In ButtonAutomatically injects a styled “Sign in with Apple” button into MyListing’s login and registration forms.
Popup-Based AuthenticationUses Apple’s JavaScript SDK with a popup window — no full-page redirects, so users stay on your site.
Server-Side VerificationAuthorization codes are verified server-side with Apple’s token endpoint for security.
Automatic User CreationNew users get a WordPress account created automatically on first Apple Sign-In.
Existing User LinkingIf a user already has an account with the same email, their Apple ID is linked automatically.
MyListing Role SupportRespects MyListing’s primary and secondary user role system during registration.
Social Login CompatibilityWorks alongside other CoDicts social login plugins (Facebook, LinkedIn, etc.).
Enable/Disable ToggleQuickly turn the feature on or off from the settings page.

How It Works

When a visitor who is not logged in views a page with a MyListing login form, the plugin injects a “Sign in with Apple” button. Clicking it opens an Apple Sign-In popup where the user authenticates with their Apple ID (Face ID, Touch ID, or password).

After successful authentication, the plugin verifies the credentials server-side with Apple, then resolves the user account using a three-step process:

StepLookupResult
1Search for a user already linked to this Apple IDIf found, logs them in immediately.
2Search for a user with the same email addressIf found, links their Apple ID to the existing account and logs them in.
3No matching user foundCreates a new WordPress account with the Apple-provided details and logs them in.

After login, the user is redirected back to the page they came from.

Apple’s privacy feature: Users can choose to hide their real email via Apple’s Private Email Relay. In this case, a unique @privaterelay.appleid.com address is used. The plugin handles this transparently — everything works normally with the relay email.


Apple Developer Setup Guide

Before the plugin can work, you must create credentials in the Apple Developer Portal. This is a one-time setup.

Step 1: Create an App ID

1. In the Apple Developer Portal, go to Certificates, Identifiers & Profiles → Identifiers.

2. Click + to register a new identifier. Select App IDs and continue.

3. Enable the Sign in with Apple capability.

4. Note your Team ID — visible in the top-right of the developer portal or under Membership. It’s a 10-character alphanumeric string.

Step 2: Create a Services ID (Client ID)

1. Go to Identifiers → click +. Select Services IDs and continue.

2. Provide a description and a unique identifier (e.g., com.yoursite.signin) — this becomes your Client ID.

3. Enable Sign in with Apple and click Configure:

FieldWhat to Enter
Domains and SubdomainsYour site’s domain without http:// or https:// (e.g., yoursite.com)
Return URLsYour site’s full home URL (e.g., https://yoursite.com)

4. Save.

Tip: The plugin’s settings page displays the exact values you need for “Domains and Subdomains” and “Return URLs” based on your WordPress site URL. You can copy them directly.

Step 3: Create a Private Key

1. Go to Keys → click +.

2. Name the key and enable Sign in with Apple. Click Configure and select your primary App ID.

3. Click Register and download the .p8 key file.

4. Note the Key ID displayed after registration.

Important: You can only download the private key file once. Store it securely. If you lose it, you’ll need to create a new key.

Step 4: Configure the Plugin

In the WordPress admin under Apple Sign In, enter the credentials from the previous steps:

FieldValue
Client IDYour Services ID identifier (e.g., com.yoursite.signin)
Team IDYour Apple Developer Team ID (10-character string)
Key IDThe Key ID of the private key you created
Private KeyThe full contents of the .p8 file, including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines

Enable the “Apple Sign In Enabled?” checkbox and save. The “Sign in with Apple” button will now appear on your login forms.


Admin Settings Page

Navigate to Apple Sign In in the WordPress admin sidebar.

FieldDescription
Apple Sign In Enabled?Master toggle to enable or disable the Sign in with Apple button on your site.
Domains and SubdomainsRead-only helper field showing the value to enter in Apple’s configuration (your domain without protocol).
Return URLsRead-only helper field showing the value to enter in Apple’s Return URLs (your full site URL).
Client IDYour Apple Services ID identifier.
Team IDYour Apple Developer Team ID.
Key IDThe identifier of the private key you registered with Apple.
Private KeyThe full PEM-encoded contents of the .p8 key file.

New User Registration

When someone signs in with Apple for the first time and no matching account exists, the plugin creates a new WordPress user:

DetailHow It’s Set
UsernameTaken from the email prefix (before @). If already taken, a random suffix is appended (e.g., john_A3X9).
EmailThe email provided by Apple (or the Private Relay address if the user hides their email).
First/Last NameFrom Apple, if provided. Apple only sends the name on the first authorization — it’s stored for future reference.
PasswordA random 16-character password is generated. The user can reset it later if needed.
RoleRespects MyListing’s role system. If secondary roles are enabled and the user selects one, that role is used. Otherwise defaults to customer.

Name on first auth only: Apple only provides the user’s first and last name the very first time they authorize your app. On subsequent sign-ins, the name fields are empty. The plugin saves the name on first auth so it’s available for the user’s profile.


Example Setup

1. Create an App ID, Services ID, and Private Key in the Apple Developer Portal following the setup guide above.

2. In WordPress, go to Apple Sign In in the admin sidebar.

3. Copy the Domains and Subdomains and Return URLs values shown on the settings page into your Apple Services ID configuration.

4. Enter your Client ID, Team ID, Key ID, and paste the full Private Key contents.

5. Check “Apple Sign In Enabled?” and save.

6. Visit any page with a MyListing login form. The “Sign in with Apple” button appears automatically alongside any other social login buttons.

7. Click the button to test. The Apple popup opens, you authenticate, and you’re logged in and redirected back to the page.


Frequently Asked Questions

Do I need an Apple Developer account?

Yes. A paid Apple Developer Program membership ($99/year) is required to create the Services ID, Private Key, and other credentials needed for Sign in with Apple.

Does this require a child theme?

No. The plugin works via script injection and does not modify any theme files.

Where does the button appear?

The button is automatically injected into all MyListing login and registration forms (any element matching div.login-container). No manual placement is needed.

Can users register via Apple Sign-In, or only log in?

Both. If no existing user matches the Apple account ID or email, a new WordPress account is created automatically.

What role is assigned to new users?

The plugin respects MyListing’s role configuration. If secondary roles are enabled and the user selects one on the registration form, that role is used. Otherwise, the default customer role is assigned.

What happens if a user hides their email with Apple’s privacy feature?

Apple provides a unique Private Relay email address (e.g., xyz@privaterelay.appleid.com). The plugin uses this as the user’s email and everything works normally.

What if someone already has an account with the same email?

The plugin detects the existing account by email, links the Apple ID to it, and logs the user in. No duplicate account is created.

Does the page redirect after sign-in?

Yes. After successful authentication, the user is redirected to the page they came from, or the site home page if no referrer is available.

Can I use this alongside other social login plugins?

Yes. The plugin is designed to coexist with other CoDicts social login plugins (Facebook, LinkedIn, etc.). It detects existing social login wrappers and adds the Apple button alongside other providers.

What is the Client ID?

The Client ID is the identifier of the Services ID you create in the Apple Developer Portal (e.g., com.yoursite.signin). It is not the App ID.

Where do I find my Team ID?

Your Team ID is visible in the top-right corner of the Apple Developer Portal or under Membership details. It’s a 10-character alphanumeric string.

Does my site need HTTPS?

Yes. Apple Sign-In requires your site to be served over HTTPS. Apple will reject authentication attempts from non-HTTPS domains.

What happens when I deactivate the plugin?

The Apple Sign-In button is removed from login forms. Existing user accounts and their linked Apple IDs (stored in user meta) are preserved. Users can still log in with their username and password. Reactivating restores the Apple button.


Troubleshooting

Apple Sign-In Button Not Appearing

CauseSolution
Plugin not enabledGo to Apple Sign In settings and make sure the “Apple Sign In Enabled?” checkbox is checked.
Client ID not configuredThe button only appears when a valid Client ID is entered in the settings.
User already logged inThe button only appears for visitors who are not logged in.
No login form on the pageThe button is injected into MyListing’s .login-container elements. Verify the page has a MyListing login form.
Plugin not activatedGo to Plugins → Installed Plugins and verify the plugin is active.

Authentication Fails with “Cannot open private key”

CauseSolution
Incomplete private keyMake sure you’ve pasted the full contents of the .p8 file, including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines.
Wrong key formatThe private key must be in PEM format (the format of the .p8 file Apple provides). Do not modify or reformat the key.
PHP OpenSSL not availableThe ES256 signing requires PHP’s OpenSSL extension. Contact your hosting provider to ensure it’s enabled.

Authentication Fails with “Invalid request”

CauseSolution
Expired nonceThe page may have been open too long. Refresh the page and try again.
Plugin disabledCheck that “Apple Sign In Enabled?” is turned on in settings.

Apple Popup Blocked by Browser

CauseSolution
Browser popup blockerThe Apple Sign-In popup may be blocked by the browser. Users need to allow popups for your site, or click the popup notification in their browser’s address bar.

Authentication Fails with No Clear Error

CauseSolution
Wrong Client IDVerify the Client ID matches your Services ID identifier in the Apple Developer Portal (not the App ID).
Domain mismatchThe domain configured in Apple’s Services ID must match your site’s domain exactly. Check the “Domains and Subdomains” and “Return URLs” in Apple’s Web Authentication Configuration.
Wrong Team ID or Key IDDouble-check these values against your Apple Developer Portal account.
PHP cURL not availableThe plugin requires PHP’s cURL extension to communicate with Apple’s servers. Contact your hosting provider.

New User’s Name Not Saved

CauseSolution
Not the first authorizationApple only provides the user’s name the very first time they authorize your app. If they previously authorized it (even during testing), the name won’t be sent again. To reset, the user can go to Apple ID Settings → Sign in with Apple on their Apple device, remove your app, and re-authorize.

“MyListing Theme Not Detected” Error

The MyListing theme must be installed and active. Go to Appearance → Themes to verify.


For further support, visit codicts.com or contact us at support@codicts.com.

CoDicts Co., Ltd. © 2021-2026. All rights reserved