kroo / reflex-clerk

A reflex custom component library for clerk
20 stars 10 forks source link

ValueError: Failed to parse object #3

Closed kroo closed 4 months ago

kroo commented 5 months ago

When using social auth through clerk, the response models are not matching the response:

ValueError: Failed to parse response '{"id":"user_2hWeY...t8Q97b","object":"user","username":null,"first_name":"nikhil","last_name":"notnikhil","image_url":"https://img.clerk.com/eyJ0...iUFAifQ","has_image":false,"primary_email_address_id":"idn_2hW....H","primary_phone_number_id":null,"primary_web3_wallet_id":null,"password_enabled":true,"two_factor_enabled":false,"totp_enabled":false,"backup_code_enabled":false,"email_addresses":[{"id":"idn_2hW...UH","object":"email_address","email_address":"development@dentro-innovation.com","reserved":false,"verification":{"status":"verified","strategy":"email_code","attempts":1,"expire_at":1717714891826},"linked_to":[{"type":"oauth_github","id":"idn_2hWebX9zbr3rAQ90RwRFNwwYsQG"}],"created_at":1717714291166,"updated_at":1717714309827}],"phone_numbers":[],"web3_wallets":[],"passkeys":[],"external_accounts":[{"object":"external_account","id":"eac_2.Yc9","provider":"oauth_github","identification_id":"idn_2hWebX...YsQG","provider_user_id":"135163019","approved_scopes":"read:user user:email","email_address":"development@dentro-innovation.com","first_name":"dentroai","last_name":"","avatar_url":"https://avatars.githubusercontent.com/u/135163019?v=4","image_url":"https://img.clerk.com/eyJ0...In0","username":"dentro-innovation","public_metadata":{},"label":null,"created_at":1717714332724,"updated_at":1717714332724,"verification":{"status":"verified","strategy":"oauth_github","attempts":null,"expire_at":1717714931097}}],"saml_accounts":[],"public_metadata":{},"private_metadata":{},"unsafe_metadata":{},"external_id":null,"last_sign_in_at":1717714332820,"banned":false,"locked":false,"lockout_expires_in_seconds":null,"verification_attempts_remaining":20,"created_at":1717714309808,"updated_at":1717714332843,"delete_self_enabled":true,"create_organization_enabled":true,"last_active_at":1717714309806,"mfa_enabled_at":null,"mfa_disabled_at":null,"profile_image_url":"https://www.gravatar.com/avatar?d=mp"}' as User

See discord discussion here: https://discord.com/channels/1029853095527727165/1241195025770217544/1248417002549415947

brandocomando commented 5 months ago

Looks like this was merged. But was it released? still seeing this error and not seeing from_oauth_google in the permitted strategies

kroo commented 4 months ago

Sorry, yeah -- it took me a while to get this released. @brandocomando this should now be resolved in v1.0.2