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

MBL-1170: Get token and User, Log in flow completed. #1954

Merged
merged 9 commits into from
Feb 22, 2024

Conversation

Arkariang
Copy link
Contributor

@Arkariang Arkariang commented Feb 21, 2024

📲 What

  • Obtain token from new Endpoint
  • Once the token is ready, call to fetch the user
  • Once token and user responses are successful, persist on CurrentUser both

🤔 Why

🛠 How

  • Added new endpoint to obtain the token
  • Added new endpoint to obtain the user (will be removed on following tickets, once we sent token for V1 as header and not a query param)

👀 See

LoginFlow.mp4

| | |

📋 QA

  • Log in, if you are logged in on the website as well, ChormeTab will not prompt you with the formulary, if you are are not logged in on the website, ChromeTab will prompt you the formulari

Story 📖

MBL-1170

@Arkariang Arkariang added the OAuth 2.0 Tied to epic https://kickstarter.atlassian.net/browse/MBL-1108 label Feb 21, 2024
@@ -73,9 +75,15 @@ Observable<Response<ActivityEnvelope>> activities(@NonNull @Query("categories[]"
@GET("/v1/users/self")
Observable<Response<User>> currentUser();

@GET("/v1/users/self")
Observable<Response<User>> currentUser(@Query("oauth_token") String token);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI: This method will be removed on following tickets, the token is gonna be sent as header and not query param.

@codecov-commenter
Copy link

Codecov Report

Attention: 85 lines in your changes are missing coverage. Please review.

Comparison is base (81d14a6) 73.94% compared to head (8405043) 73.74%.

Files Patch % Lines
...a/com/kickstarter/services/apirequests/PKCEBody.kt 0.00% 37 Missing ⚠️
.../kickstarter/services/apirequests/UserTokenBody.kt 0.00% 23 Missing ⚠️
.../java/com/kickstarter/viewmodels/OAuthViewModel.kt 70.58% 5 Missing and 5 partials ⚠️
...tarter/services/apiresponses/OAuthTokenEnvelope.kt 66.66% 7 Missing ⚠️
...om/kickstarter/viewmodels/usecases/LoginUseCase.kt 33.33% 6 Missing ⚠️
...a/com/kickstarter/viewmodels/LoginToutViewModel.kt 80.00% 0 Missing and 2 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1954      +/-   ##
============================================
- Coverage     73.94%   73.74%   -0.21%     
- Complexity     1976     1986      +10     
============================================
  Files           344      347       +3     
  Lines         19819    19944     +125     
  Branches       2759     2770      +11     
============================================
+ Hits          14656    14707      +51     
- Misses         3546     3616      +70     
- Partials       1617     1621       +4     

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

@Arkariang Arkariang self-assigned this Feb 21, 2024
@Arkariang Arkariang merged commit bb46ce7 into master Feb 22, 2024
3 checks passed
@Arkariang Arkariang deleted the imartin/MBL-1170 branch February 22, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OAuth 2.0 Tied to epic https://kickstarter.atlassian.net/browse/MBL-1108
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants