Skip to content
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

FFI: Remove the authentication service. #3594

Merged
merged 4 commits into from
Jun 24, 2024

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Jun 21, 2024

Everything is now available on Client directly, the authentication service is no longer needed. Can be reviewed commit by commit.

This closes #3029.

Of note for people adopting this:

  • Instead of calling configure_homeserver, build your own Client with the serverNameOrHomeserverUrl builder method to keep the same behaviour.
    • The parts of AuthenticationError related to discovery will be represented in the ClientBuildError returned when calling build().
  • The remaining methods can be found on the built Client.
    • There is a new abortOidcLogin method that should be called if the webview is dismissed without a callback (or fails to present).
    • The remaining AuthenticationError cases are now in an OidcError type.
  • OidcAuthenticationData is now called OidcAuthorizationData.

@pixlwave pixlwave requested a review from a team as a code owner June 21, 2024 09:52
@pixlwave pixlwave requested review from andybalaam and removed request for a team June 21, 2024 09:52
Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.83%. Comparing base (730c287) to head (4abe876).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3594   +/-   ##
=======================================
  Coverage   83.82%   83.83%           
=======================================
  Files         254      254           
  Lines       26167    26167           
=======================================
+ Hits        21935    21936    +1     
+ Misses       4232     4231    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pixlwave pixlwave mentioned this pull request Jun 21, 2024
1 task
Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great - just needs a changelog entry! (Basically re-use your PR description?)

@pixlwave
Copy link
Member Author

Added it - there wasn't one on the FFI so I copied the format from the main SDK.

Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@andybalaam
Copy link
Member

@pixlwave I see some value in the separate commits here, so would prefer not to squash-merge. Do you feel like doing the work to rebase to remove the fix-up commits? If not I'll just squash.

@pixlwave
Copy link
Member Author

Good point, done 👍

@jmartinesp
Copy link
Contributor

I just want to confirm these changes seem to work fine on Android after adding the needed changes.

@pixlwave
Copy link
Member Author

@andybalaam Do you think we can ignore that complement failure? It happily picked up the branch name before (and passed) but after the rebase is seemingly having a hard time with it. I vow not to use emoji in branch names again 🥺

@bnjbvr
Copy link
Member

bnjbvr commented Jun 24, 2024

@andybalaam Do you think we can ignore that complement failure? It happily picked up the branch name before (and passed) but after the rebase is seemingly having a hard time with it. I vow not to use emoji in branch names again 🥺

I'll be the party pooper here, sorry. Can you reopen this PR with a different branch name? There's no way to know if it actually passes the Complement tests or not, in the current form. (And yeah, it might be that some code in the branch matching resolving doesn't account for non-ascii UTF8 😁)

@pixlwave
Copy link
Member Author

Ok. Lemme try rebasing on main first and see if that nudges it 🤞 If not I'll do a new PR.

@bnjbvr
Copy link
Member

bnjbvr commented Jun 24, 2024

Ah, it seems the Complement Crypto test now proceeds further! Another success for the law of serendipity \o/

@pixlwave
Copy link
Member Author

Nice, then emoji branch in names can remain a valid choice 😎

@bnjbvr bnjbvr enabled auto-merge (rebase) June 24, 2024 08:48
@bnjbvr bnjbvr merged commit e89659b into main Jun 24, 2024
38 checks passed
@bnjbvr bnjbvr deleted the doug/🔥authentication-service🔥 branch June 24, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move the authentication service into the main SDK.
4 participants