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

Login > Bundle ID switcher (UPDATED in comments) #427

Open
paulgosnell opened this issue Feb 13, 2023 · 4 comments
Open

Login > Bundle ID switcher (UPDATED in comments) #427

paulgosnell opened this issue Feb 13, 2023 · 4 comments
Labels
Milestone

Comments

@paulgosnell
Copy link
Contributor

What we need is to add an optional param to auth/connect smt like clientName = 'Fitlink' | 'BFIT'. By default it should be ‘Fitlink’, so that we don’t have to change Fitlink app logic.
Then we need to map this clientName to env variable. Now we use only IOS_BUNDLE_ID inside verifyProviderApple but we need different bundle ids for each app. So you’ll have to replace IOS_BUNDLE_ID with FITLINK_IOS_BUNDLE_ID="com.fathomux.Fit-Link" and BFIT_IOS_BUNDLE_ID="com.bfitcoin" and use them here let clientId = this.configService.get('IOS_BUNDLE_ID')

Originally posted by @paulgosnell in #396 (comment)

@paulgosnell
Copy link
Contributor Author

UPDATE:
Need the same logic built for Android so FITLINK_ANDROID_BUNDLE_ID and BFIT_ANDROID_BUNDLE_ID

@paulgosnell
Copy link
Contributor Author

UPDATE 2:
Need the same logic for Strava and Fitbit!

STRAVA_CLIENT_ID=""
FITBIT_CLIENT_ID=""
STRAVA_CLIENT_SECRET=""
FITBIT_CLIENT_SECRET=""

@paulgosnell
Copy link
Contributor Author

UPDATE 3:

@Clinton Illa, we have to do the same thing as we did for Android/iOS client ids for Strava and Fitbit providers authentication. For example, StravaControler sends oauth_url which contains STRAVA_CLIENT_ID and STRAVA_CLIENT_SECRET for both App which is wrong, because we have BFIT_STRAVA_CLIENT_ID and BFIT_STRAVA_CLIENT_SECRET

@paulgosnell paulgosnell mentioned this issue Feb 25, 2023
10 tasks
@paulgosnell
Copy link
Contributor Author

paulgosnell commented Feb 27, 2023

hey @Clish254 to confirm, we have the following...

FITLINK_IOS_BUNDLE_ID = com.fathomux.Fit-Link
BFIT_IOS_BUNDLE_ID = com.bfitcoin
FITLINK_ANDROID_BUNDLE_ID = app.fitlink
BFIT_ANDROID_BUNDLE_ID = app.bfitcoin

...which has new logic built in to switch keys based on client_name: 'Fitlink' | 'BFIT'

The below is old and needs to stay for Fitlink...

STRAVA_CLIENT_ID = 59872
STRAVA_CLIENT_SECRET = 657513b1852f65d2d5dac18ca08d77780e1cd5af

FITBIT_CLIENT_ID = 22DJFY
FITBIT_CLIENT_SECRET = 8f57cfb0466f46e42a05215c6dc49e69
FITBIT_VERIFY_WEBHOOK_ACTIVITIES = 985f863ebb04e07954c17d6754a8e19020972723d79b885e01ae4578ba5bd152
FITBIT_VERIFY_WEBHOOK_DEFAULT = 951cfd6df4b909a17336307b086f03ca6eb566494cb8149ad023e5cf36a141a3
FITBIT_VERIFY_WEBHOOK_SLEEP = cc53c4f58aacebcc193f9456987045dd5a7cf40947dd92d19124d736b2d33279

...and the below is new and needs similar logic as above to switch...

Strava

BFIT_STRAVA_CLIENT_ID = 102709
BFIT_STRAVA_CLIENT_SECRET = 52b93a25337e7a35f0c149d4f1679f9c87a31131

Fitbit

BFIT_FITBIT_CLIENT_ID = 2395DV
BFIT_FITBIT_CLIENT_SECRET = 4d1545c6c6a4407ac44d92c35387f232
BFIT_FITBIT_VERIFY_WEBHOOK_ACTIVITIES = c514dd0e0203723a6c7d41dc7454621e2f886597cdd0b81689ab269f3865aab7
BFIT_FITBIT_VERIFY_WEBHOOK_DEFAULT = 10e8ba58e30ba3ac719fb9b563854a6505ec64ebb5d6a60a862d2851b687092b
BFIT_FITBIT_VERIFY_WEBHOOK_SLEEP = 5d9de9953951b095aa855e4f8fb8cf641fdd5d8c122995eab082daf9dbe8a15c

@paulgosnell paulgosnell changed the title Login > Bundle ID switcher Login > Bundle ID switcher (UPDATED in comments) Feb 27, 2023
@paulgosnell paulgosnell assigned Jordan-Hall and unassigned Clish254 Mar 1, 2023
Jordan-Hall added a commit that referenced this issue Mar 8, 2023
Jordan-Hall added a commit that referenced this issue Mar 12, 2023
Jordan-Hall added a commit that referenced this issue Mar 16, 2023
* fix: Use header to get the client id

ref: #427
Jordan-Hall added a commit that referenced this issue Mar 16, 2023
* fix: Use header to get the client id

ref: #427
Jordan-Hall added a commit that referenced this issue Mar 20, 2023
* ✨ 548 - auth logic base (Enter + Create + cooldown + on active)

* fix: Use header to get the client id (#547)

* fix: Use header to get the client id

ref: #427

* ✨ 548 - final auth version

* ✨ 548 - add setting toggle, request biometry on active

* ✨ 548 - podfile

* removed dollar item

* fixes

* fix: repair strava (#593)

* fix: repair strava

Signed-off-by: Jordan Hall <[email protected]>

* fix: repair unit test

Signed-off-by: Jordan Hall <[email protected]>

---------

Signed-off-by: Jordan Hall <[email protected]>

---------

Signed-off-by: Jordan Hall <[email protected]>
Co-authored-by: KirillRodichev <[email protected]>
Co-authored-by: Kirill Rodichev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants