edx-app-ios icon indicating copy to clipboard operation
edx-app-ios copied to clipboard

[chore] jwt authentication implementation

Open mumer92 opened this issue 2 years ago • 3 comments

Description

LEARNER-8796

For in-app purchases, we need to make api calls to e-commerce backend of edx-platform. E-commerce apis use jwt authentication instead of bearer authentication, so we need to migrate from bearer to jwt and also let users use the application who have already logged in. New refresh token calls for existing apis fetch the new jwt token using the old refresh_token, once updated, application will be migrated to fetch jwt token, while if a user signs in again, application will receive jwt token.

Implementation of following authentication cases:

  • [ ] Username/Password
  • [ ] Social login
  • [ ] Token Expiration
  • [ ] Webview Authentication

How to test this PR

  • [ ] Mobile client can authenticate and use ecommerce endpoints
  • [ ] Mobile client can still authenticate and use webviews and other endpoints

Notes:

Currently jwt implementation is available on iap sandbox

mumer92 avatar Jul 25 '22 06:07 mumer92

@mumer92 I haven't see any change to request JWT token in case of social auth.

saeedbashir avatar Jul 27 '22 05:07 saeedbashir

@asifbilal786 You can review this PR.

saeedbashir avatar Aug 03 '22 08:08 saeedbashir

@mumer92 tests are failing

saeedbashir avatar Sep 28 '22 10:09 saeedbashir