Doctor Tool For Debugging (v1)
Reference
I will be using flutter doctor as a main reference for these improvements as i think its a very helpful tool to figure out how to configure your flutter setup and it would help developers using our SDK to have something similar to guide them.
What
Goal
Our goal will be to make the DX better by introduction a doctor functionality that goes through common issues and pinpoints them and suggests solutions for developers.
Structure
- Unlike the doctor function integrated by Flutter which runs through their CLI, our solution will be a method integrated into the SDK. (mostlikely will call it
doctor()) - The method can be called in the developer's application and will be also integrated into our example
- It returns a collection of check points, that we go through one by one, each containing a
description,isValid? boolean and an optionallinkfield in case where the issue is complicated and we need to deeplink into our docs. - It will also return some informative data like the
projectIdand theRPID. - In the example we will showcase the results into a box (as an overlay)
- Maybe we can make it into its seperate sub-package and we integrate it into the SDK , the same way we did with the passkeys_ios/passkeys_android that way we can keep it cleaner ?
- We can also check the current version of the corbado_auth package and recommend that the user upgrades to the newer verions ?
Checklist
- [x] Check that the projectID is set correctly
- [x] Check that the RPID is set correctly (string check that it fits)
- [ ] Check the Runner.entitlements and get the web entitlements and compare to the RPID (Wont do, check comment)
- [x] Fetch the AASA file and compare the content with the project bundle and team ID (check for HTTPS and correct application/type header)
- [x] Fetch the assetlinks file and compare with the app bundle (and if possible the fingerprint ?)
@corbadoman concerning the Runner.entitlements , after some deep research turns out that apple does not allow that information to be accessed through the app thus we can't really check that part.
@Dopeamin how about this one: We can also check the current version of the corbado_auth package and recommend that the user upgrades to the newer verions ?
I wanted to leave that as a V2 and an inprovement later on as it seemed like a secondary function. cc @corbadoman