Skip to content

walkerheathr24-rgb/HR-Walker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

HR-Walker

Auth0.swift Workaround

This repository documents a workaround for Auth0.swift issue #950.

Issue Description

A fix for GH issue 950 has been implemented and merged. See PR #1008 for the complete solution.

Credits

Implementation

The fix addresses authentication issues in Auth0.swift. For implementation details and code changes, please refer to the upstream pull request.

Mac Setup Instructions

Prerequisites

  • macOS 10.15 (Catalina) or later
  • Xcode 12.0 or later
  • Swift 5.3 or later

Installation

Option 1: Swift Package Manager (Recommended)

  1. Open your project in Xcode
  2. Navigate to File > Add Packages...
  3. Enter the repository URL: https://github.com/auth0/Auth0.swift
  4. Select the version that includes the fix (2.8.0 or later)
  5. Click Add Package

Option 2: CocoaPods

  1. Add the following to your Podfile:
    pod 'Auth0', '~> 2.8'
  2. Run pod install in your terminal
  3. Open the .xcworkspace file generated by CocoaPods

Option 3: Carthage

  1. Add the following to your Cartfile:
    github "auth0/Auth0.swift" ~> 2.8
    
  2. Run carthage update --use-xcframeworks --platform iOS
  3. Follow the Carthage integration guide to add the framework to your project

Configuration

Create Auth0.plist

  1. Create a new file named Auth0.plist in your Xcode project
  2. Add your Auth0 credentials:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>ClientId</key>
        <string>YOUR_AUTH0_CLIENT_ID</string>
        <key>Domain</key>
        <string>YOUR_AUTH0_DOMAIN</string>
    </dict>
    </plist>

Update Info.plist for Web Authentication

Add the following URL scheme to your Info.plist:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>None</string>
        <key>CFBundleURLName</key>
        <string>auth0</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
        </array>
    </dict>
</array>

Verifying the Fix

The fix for issue #950 prevents crashes related to continuation resume being called multiple times. To verify:

  1. Ensure you're using Auth0.swift version 2.8.0 or later
  2. Test Web Authentication flows in your application
  3. Check that authentication callbacks are handled correctly without crashes

Troubleshooting

Common Issues on Mac

  • Build fails with "No such module 'Auth0'": Clean build folder (⌘ + Shift + K) and rebuild
  • Callback URL not working: Verify your URL scheme matches your bundle identifier
  • Xcode can't find the package: Check your internet connection and try resetting package caches

Additional Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors