Automattic / Automattic/pocket-casts-ios

Task: Revisit Missing email decission

Open
#412 0 comments 0 reactions 0 assignees View on GitHub
SSO
Dominant language
Swift
Stars
1.8k
Forks
197
Avg merge
17h 20m
Merged PRs (30d)
103

Description

When adding Apple SSO support, the API response also introduced support for returning the Sync email from the provided JWT token.

In the [current immplementation](https://github.com/Automattic/pocket-casts-ios/pull/409/files#diff-e1ee3e8d716e15b59667a3ed1ad5c97c7da85c0300ffe890847c97d48252289eR102-R104) (as of opening this task). We check for the email and avoid setting the value if the email is empty to prevent overriding a value set by the password flow and not returned by the API.

This check might not be needed when the changes for `user/login_apple` are merged to prod. We can revisit that decision and fail the login attempt within the common token request of [obtainToken](https://github.com/Automattic/pocket-casts-ios/pull/409/files#diff-032fe1f2cd3597f5dc28351d8a82ece28bea8ed8a091921206a45088eb1f5968L154).

Contributor guide

Open the contributing guide

Research direction

Review the current email check in the implementation linked from PR #409 and the common token request in obtainToken. Confirm whether user/login_apple now guarantees an email in production; done means a login attempt fails there when the JWT email is missing instead of preserving the previous value.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
authentication, mobile-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.