Skip to content

Auth.KeychainError(code=itemNotFound) on MacOS with SDK v2.16ย #516

@rebryk

Description

@rebryk

Bug report

  • [+] I confirm this is a bug with Supabase, not with my own application.
  • [+] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When i switched from supabase v2.0 to v2.16 try await supabaseClient.auth.session throws Auth.KeychainError(code=itemNotFound) on MacOS.

To Reproduce

  1. Create a sign URL
try supabaseClient.auth.getOAuthSignInURL(
      provider: Provider.google,
      redirectTo: `app-schema://auth`
)
  1. Open url
NSWorkspace.shared.open(url)
  1. Handle deeplink after Google authorization
func application(_ application: NSApplication, open urls: [URL]) {
    if let url = urls.first, url.host == "auth" {
        Task {
            try await supabaseClient.auth.session(from: url)
        }
    }
}
  1. Step 3 returns a valid session; however, try await supabaseClient.auth.session will throw an Auth.KeychainError(code=itemNotFound) error.

Expected behavior

I expect try await supabaseClient.auth.session to restore the session from the keychain as it did before in previous SDK versions.

System information

  • OS: macOS
  • Browser (if applies) Arc Browser
  • Version of supabase: v2.16

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions