Skip to content

Commit

Permalink
IOS Username, Password, Payment and Device Linking flow (#1019)
Browse files Browse the repository at this point in the history
* Design Sign in screen.

* Create blank screen and make changes in  CTextField to support  password type.

* Design Enter password screen.

* Reuse sign in screen for Reset password one.

* Design verification screen.

* Design Reset password screen.

* Design Create Account screen and dialogs.

* Completed create account flow.

* Refactor code.

* Change pro condition

* Added pro account dialog.

* Added input validation across multiple screens

* Started working on SRP stuff.

* Added signup API.

* Implemented step 1 and 2 for login request

* Added prepare API call.

* Change API model to use protos.

* Added logs.

* Update protos, Mange errors,

* Added changes to signup API and UI changes.

* Implemented sign up API.

* Change Salt API to use email.

* IOS Payment (#964)

* Added Plan V3 API.

* Enable Upgrade screen and start working on currency format.

* Completed pre process of plans.

* Use dynamic local.

* Append currency code.

* Added In App Purchase for IOS.

* Started working on API.

* Implement helper for purchase request.

* Implemented Promo code flow.

* Fixed issue device nog showing up.

* Calculate Expirydate

* Added mock API call for apple pay.

* Run mode tidy and removes static data.

* Fetch user id for first time user.

* Fixed iOS IAP.  (#962)

* Update flashlight and go versions (#949)

* Update flashlight and go versions

* Do not enforce go version in Makefile

* Revert "Update flashlight and go versions (#949)" (#950)

This reverts commit eab0e69.

* add a template for GitHub integrated release notes

* generate automatic changelog on release, then trigger automation repo

* fixed IAP flow

* fixed IAP flow

---------

Co-authored-by: Myles Horton <[email protected]>
Co-authored-by: atavism <[email protected]>
Co-authored-by: Jay <[email protected]>

* Added error handling.

* Implemented email warning widget.

* Changes in logs.

* Fixed merge conflicts.

---------

Co-authored-by: Eli Yukelzon <[email protected]>
Co-authored-by: Myles Horton <[email protected]>
Co-authored-by: atavism <[email protected]>
Co-authored-by: Jay <[email protected]>

* Implemented verification flow for pro user.

* Implemented Login API.

* Added password validation in sign in and Implemented Signout design.

* Started working on reset password flow.

* Implemented Account Recovery flow.

* Refactored account management code and fixed issues in the sign-in process.

* Added Model extension in swift.

* Fixed user caching issue.

* Design change email screen with validation.

* Completed Change email feature.

* Throw same error as login.

* Use Notifier for logout tile.

* Implemented signout.

* Design Delete Account flow and Implemented API

* Refactor code, changes in purchase data and started working on payment with UN/PW flow.

* Show warning only if user is logged in/

* Added validation while delete account.

* Implemented Delete Account.

* Added showPasswordSuccessDialog and some other changes.

* Added ablity to create account and fix issue with salt.

* Show proper error while Reset password.

* Hide Device linking for ios.

* Changes in start up sequence and some other changes.

* Design new landing screen when user comes first time.

* updated error message.

* Updated to flutter 3.16

* Upload internal build to testflight.

* Uploaded new build to testflight.

* Update prod.xcscheme

* Updated DWARF_DSYM_FOLDER_PATH path

* Update build config.

* Fixed edge case for in app puchase.

* Fixed UI issues for Un/Pw flow.

* IOS Device Linking (#969)

* Enable Device LInking and added request Code API.

* Implemented user-recovery API.

* Implemented Add device from account menu.

* Ability to remove device from account management screen

* Added key chain service and Enable add device option.

* Added comment.

* implemented Link device using email.

* Uploaded build to TestFlight 7.5.4.

* Added PR requested chanegs.

* Created method for GenerateEncryptedKey and reuse it.

* Ran go mod tidy

* Uploaded build to testflight.

* Added dialog for change email.

* Updated change email request.

* Remove change password button.

* Added option to sign in once user reset password.

* Uploaded new build to testflight.

* Made changes on pro activation code flow support username password.

* Added email confirm dialog.

* Added device limit templet.

* Created logo with text widget and reuse.

* Remove duplicate imports.

* Design Device limit screen with validation.

* Check Device connected if not switch to free account.

* Added remove device method.

* Added device id payload in two endpoints.

* Check for max device limit and ask user to removed if needed.

* Avoid calling api when user goes back on sign in.

* Save user device if user has reached limit.

* Device limit flow changes.

* Create reuseabel widget.

* Updated header for auth flow.

* Implemented Validate email API.

* Made changes in Create account flow.

* Made changes on verification flow.

* Change pro dialog location.

* Updated signup request payload add skip email.

* Change design of promo codes and make changes on same flow.

* By pass account creation when pro user for promo code flow.

* Mange multiple routes for verification.

* Updated tos widget.

* updated webview.

* Added some more validation.

* Updated change email protoc.

* Started working on change email flow.

* Completed change email flow.

* Hide Change email while create account.

* Uploaded 7.5.5 to testflight.

* While creating account use forgot password resend.

* Fix issue on promo code.

* Uploaded build to testflight.

* Fixed merged conflicts.

* Merged main to this (Working on conflicts.)

* Merged ios client to use new network model.

* fixed merged conflicts on flutter end.

* Fixed some UI issue and method channel issue.

* Add ability to pass custom header on api client.

* send proper error to UI.

* added documenation sign auth methods

* Remove unused logs.

* Use auth client for auth apis.

* use ChainedThenFronted proxies

* Continue working on auth flow changes.

* Fixed issue on link validate API.

* fixed issue while sign up.

* Delete account if user comes back from verification.

* update protoc and show message when recovery code is wrong.

* fixed issue with device linking.

* add redeem code method in ios.

* Removed commented code.

* Expose header to all endpoints.

* update action type in reportIssue.

* Uploaded build to testflight 7.5.7

* Pass user id as header in signup.

* implement device add api.

* Uploaded 7.5.8 to testflight.

* updated price change lang and cleanups.

* removed unused code.

* fixed merged conflicts.

* Comment out test cases and check for error on reseller

* more cleanups.

* Ran gofmt.

* Started working on pro user chanegs.

* added exciting pro user flow.

* Exclude db from Icloud storage.

* Small UI changes

Remove sign in button from Update Popup
Added fetchPlan method if plans not found
Added back signout.

* update account popup.

* show first time screen only when user is new.

* Hide device linking for ios.

* Uploaded new build.

* Updated some pacakges.

* Read currency from planId.

* make sure email is lowercase for auth methods.

* Remove commented code.

* added back device linking.

* enable device logout code and small other chanegs.

* Remove automatic code signin.

* Started working on signout api.

* Fix issue with plist.

* Added isUserLoggedIn method.

* Fix issue with new signout flow

* Update .gitignore

* Upload new build to testflight

* Uploaded 7.5.14 to testflight.

* Fixed multiple issues

Fixed issue on plans screen
Call userCreate when user signout
Change location of landing page.
Fixed issue on Device linking

* Uploaded build to testflight.

* Added internal headers.

* Update Podfile.lock

* Hide authflow from other platform but ios.

* Added legacy reseller checkout.

* Added internal header to track platform.

* Change VPN tab ui and disable ads.

* Uploaded build 7.5.16 to testflight.

* Show pro banner if user is not pro.

* Removed duplicates string and fix config issue.

* Remove duplicated strings.

* iOS Username and Password: Code Review Suggestions (#1101)

* code review updates

* code review updates

* code review updates

* add back deleted Package.resolved

* set application/x-protobuf content type on auth client

* update comments

* do not set content-type header in pro client

* move webclient package up a level

* move webclient package up a level

* clean-ups

* clean-ups

* run go mod tidy

* pass default header in signup.

* Fixed issue with getting null while setting header.

* Fixed issue with reportissue.

* increase debounceDuration in ios.

* add AddCommonUserHeaders and other clean-ups

* clean-ups

* clean-ups, add AddInternalHeaders

* clean-up auth client request middleware

* update vpn tab

* update vpn tab

* update internet checker

* use resty.PreRequestHook

* use resty.PreRequestHook

* update go-resty

* fix bug

* use resty.RequestMiddleware again

* add comment

* do not set content type in pro client

* do not set content type in pro client

---------

Co-authored-by: Jigar-f <[email protected]>

* go mod tidy

* Remove scale widget for mobile ui.

* Fixed connectivity warning issue.

* Updated flashlight and change debounceDuration for ios.

* Uploaded 7.6.17 to testflight.

* Remove unused code.

* fixed issue while reseller flow.

* Pulled new translation.

* Fixed issue on tx/config locale file not updating.

* Uploaded 7.5.18 to testflight.

* Fix languages mapping and pull translation.

* Fixed merged conflicts and updated some packages.

* Uploaded 7.5.19 to testflight.

* Hide datacap on ios.

* Fixed issue with authClient.

* fixed issue on report issue edit text.

* Ask for password while reseller flow.

* Uploaded 7.5.20 to testflight.

* increase checkInterval time.

* Refactor Ad helper and do not load ads multiple times.

* Update ad_helper.dart

* Deleted account when user click on verification.

* Uploaded 7.5.21 to testflight.

---------

Co-authored-by: Eli Yukelzon <[email protected]>
Co-authored-by: Myles Horton <[email protected]>
Co-authored-by: atavism <[email protected]>
Co-authored-by: Jay <[email protected]>
Co-authored-by: atavism <[email protected]>
  • Loading branch information
6 people authored Jun 26, 2024
1 parent 9e587fd commit 72040e7
Show file tree
Hide file tree
Showing 132 changed files with 15,735 additions and 2,089 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@ liblantern_amd64.dylib
lib/generated_bindings.dart

*.env
ExportOptions.plist
5 changes: 2 additions & 3 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ lang_map = zh-Hant: zh-rHK, bn_IN: bn-rIN, bg_BG: bg-rBG, ku_IQ: ku-rIQ, pl_

[o:lantern-1:p:lantern:r:lantern-flutter]
file_filter = assets/locales/<lang>.po
source_file = assets/locales/en.po
source_file = assets/locales/en-us.po
source_lang = en_US
type = PO
minimum_perc = 80
lang_map = hi_IN: hi-in, zh_CN: zh-cn, zh_HK: zh-hk, ru_RU: ru-ru, fa_IR: fa-ir, es_CU: es-cu, es_EU: es-es, fr_FR: fr-fr, fr_CA: fr-ca

lang_map = hi_IN: hi-in, zh_CN: zh-cn, zh_HK: zh-hk, ru_RU: ru-ru, fa_IR: fa-ir, es_CU: es-cu, es: es-es, fr_FR: fr-fr, fr_CA: fr-ca, ar: ar-eg, ur: ur-in, vi: vi-vn, tr: tr-tr, th: th-th, bn: bn-bd, my: my-mm, ms: ms-my
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ internalsdk/protos/%.pb.go: protos_shared/%.proto
internalsdk/protos/vpn.pb.go: protos_shared/vpn.proto
@protoc --go_out=internalsdk protos_shared/vpn.proto

internalsdk/protos/auth.pb.go: protos_shared/auth.proto
@protoc --go_out=internalsdk protos_shared/auth.proto

# Compiles autorouter routes
routes: lib/core/router/router.gr.dart

Expand Down Expand Up @@ -462,6 +465,10 @@ set-version:


ios-release:set-version guard-SENTRY_AUTH_TOKEN guard-SENTRY_ORG guard-SENTRY_PROJECT_IOS build-framework
@echo "Flutter Clean"
flutter clean
@echo "Flutter pub get"
flutter pub get
@echo "Creating the Flutter iOS build..."
flutter build ipa --flavor prod --release --export-options-plist ./ExportOptions.plist
@echo "Uploading debug symbols to Sentry..."
Expand Down Expand Up @@ -692,6 +699,21 @@ build-framework: assert-go-version install-gomobile
mkdir -p $(INTERNALSDK_FRAMEWORK_DIR)
mv ./$(INTERNALSDK_FRAMEWORK_NAME) $(INTERNALSDK_FRAMEWORK_DIR)/$(INTERNALSDK_FRAMEWORK_NAME)

build-release-framework: assert-go-version install-gomobile
@echo "Nuking $(INTERNALSDK_FRAMEWORK_DIR) and $(MINISQL_FRAMEWORK_DIR)"
rm -Rf $(INTERNALSDK_FRAMEWORK_DIR) $(MINISQL_FRAMEWORK_DIR)
@echo "generating Ios.xcFramework"
go env -w 'GOPRIVATE=github.com/getlantern/*' && \
gomobile init && \
gomobile bind -target=ios \
-tags='headless lantern ios netgo' \
-ldflags="$(LDFLAGS)" \
$(GOMOBILE_EXTRA_BUILD_FLAGS) \
github.com/getlantern/lantern-client/internalsdk github.com/getlantern/pathdb/testsupport github.com/getlantern/pathdb/minisql github.com/getlantern/lantern-client/internalsdk/ios
@echo "moving framework"
mkdir -p $(INTERNALSDK_FRAMEWORK_DIR)
mv ./$(INTERNALSDK_FRAMEWORK_NAME) $(INTERNALSDK_FRAMEWORK_DIR)/$(INTERNALSDK_FRAMEWORK_NAME)


install-gomobile:
@echo "installing gomobile" && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public String getFormattedPrice(Map<String, Long> price) {
return getFormattedPrice(price, false);
}

private String getFormattedPrice(Map<String, Long> price, boolean formatFloat) {
private String getFormattedPrice(Map<String, Long> price, boolean formatFloat) {
final String formattedPrice;
Long currencyPrice = price.get(currencyCode);
if (currencyPrice == null) {
Expand Down
21 changes: 21 additions & 0 deletions assets/images/add_account_ illustration.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/empty_check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/eye.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/eye_cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/lock_filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/sign_in.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/sign_out.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/warning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 72040e7

Please sign in to comment.