chore: Update to use new signIn function#6
Merged
Conversation
cbe039b to
d5d3f9f
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates the signIn function to use a new API that simplifies the authentication flow by consolidating permissions into a single array and enriching the response with additional user information.
- Simplified
signInfunction signature from two permission arrays (required/optional) to a single permissions array - Renamed
YouVersionLoginResulttoSignInWithYouVersionResultand made all fields optional - Added new user fields to the sign-in result:
expiryDate,refreshToken,name,profilePicture, andemail
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Renamed result type and added optional user fields (expiryDate, refreshToken, name, profilePicture, email) |
| src/native.ts | Updated native module signature to accept single permissions array |
| src/api/users.ts | Simplified API to accept single permissions parameter instead of object with required/optional fields |
| src/tests/RNYouVersionPlatform/native-test.native.ts | Updated test to use new single-array API and use objectContaining matcher |
| mocks/RNYouVersionPlatform.ts | Updated return type name to SignInWithYouVersionResult |
| ios/YVPAuthAPI.swift | Updated Swift implementation to use single permissions set and map new user fields to response |
| ios/RNYouVersionPlatformModule.swift | Updated module function signature to accept single permissions array |
| example/src/screens/ProfileScreen.tsx | Updated example to use new API and improved error handling separation |
| README.md | Updated documentation to reflect new API signature and return fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mic-mart
approved these changes
Nov 18, 2025
mic-mart
left a comment
Collaborator
There was a problem hiding this comment.
Nice work @sidorchukandrew !
Instead of requiredPermissions and optionalPermissions, we will only support a simple array of permissions.
cdbafa6 to
09a61f2
Compare
jhampton
pushed a commit
that referenced
this pull request
Nov 20, 2025
|
🎉 This PR is included in version 0.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This includes a change to what we pass to the function as well as what gets returned. The 2 permissions arrays is now just 1 array. The returned object also contains extra fields about the user.