-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth.KeychainError(code=itemNotFound)
on MacOS with SDK v2.16
#516
Comments
Hi @rebryk try attaching a logger on Supabase initialization, and let me know if you see any other log being fired, this is how you can do it. let supabase = SupabaseClient(
supabaseURL: URL(string: "URL")!,
supabaseKey: "API_KEY",
options: .init(
global: .init(logger: AppLogger())
)
)
struct AppLogger: SupabaseLogger {
let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "supabase")
func log(message: SupabaseLogMessage) {
switch message.level {
case .verbose:
logger.log(level: .info, "\(message.description)")
case .debug:
logger.log(level: .debug, "\(message.description)")
case .warning, .error:
logger.log(level: .error, "\(message.description)")
}
}
} |
|
The key is I'll also check on my side, if there is anything wrong, since you mentioned it stoped working. |
As far as I understand, macOS apps have default access to a private Keychain for storing app-specific data (you do not need to add any entitlements, i don't use keychain sharing). Also, everything works with previous versions of the SDK. @grdsdev so it is most likely an issue with the new version Let me know if i can help |
It seems it started after this #455 |
you are right: 2.14 works, and 2.14.1 does not |
Doing a few tests and if you add the keychain sharing capability to your app, even if you don't assign any access group, it works, will try to find on docs why that happens. |
Yeah, when I add the keychain sharing capability, the app works. Hopefully it will not break anythings else |
I have an issue when I run a signed release with empty keychain sharing capability: |
Same thing when I add:
|
@rebryk if you add an access group, then you need to provide a custom |
@grdsdev do you have an off-the-shelf implementation? i just want to use supabase in a way I used it before |
You can use the following code, once I merge this #519
let supabase = SupabaseClient(
supabaseURL: URL(string: "https://project-id.supabase.com")!,
supabaseKey: "supabase-anon-key",
options: .init(
auth: .init(
localStorage: KeychainLocalStorage(
accessGroup: "<# Your Team ID #>.app.getfluently.Fluently"
)
)
)
) |
@grdsdev i have an issue with
|
Bug report
Describe the bug
When i switched from supabase v2.0 to v2.16
try await supabaseClient.auth.session
throwsAuth.KeychainError(code=itemNotFound)
on MacOS.To Reproduce
try await supabaseClient.auth.session
will throw anAuth.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
The text was updated successfully, but these errors were encountered: