Closed mike-audi closed 5 months ago
Per @timoguin's request: here are the basic instructions for getting started developing with TIKI for L0 services
docker compose up
from project rootNote for l0-auth service, there is a 4th optional step: To test/debug one-time-password's via email requires a SendGrid API key. The contributor needs to open an issue with their email/alt form of contact to receive the key. Then run docker compose up -e SENDGRID_API_KEY=[KEY]
To debug the application run a remote JVM debug using the following CLI config:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000
see the screenshot for example, IntelliJ debug config
Note for l0-auth service, there is a 4th optional step: To test/debug one-time-password's via email requires a SendGrid API key. The contributor needs to open an issue with their email/alt form of contact to receive the key. Then run
docker compose up -e SENDGRID_API_KEY=[KEY]
This is a stickler. We definitely don't want contributors to have to do this. What would it take to get rid of this requirement?
Does Sendgrid's sandbox mode also require an API key (I'm assuming yes).
https://docs.sendgrid.com/for-developers/sending-email/sandbox-mode
If not, I'd like to see he we might be able to mock it out somehow.
To debug the application run a remote JVM debug using the following CLI config:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000
see the screenshot for example, IntelliJ debug config
Can we make this debug config shareable? I'm thinking about the way you can add project-level settings for other IDEs like Visual Studio or VS Code.
The service runs and works without the API Key, but if you want to work on the specific email-based OTP implementation, you'll need an API Key -even for their Sandbox. If we publicly share a Sandbox key, it'll get shut off sooner than later.
There is not a great alternative since all SMTP services will require similar, other than including a debug flag of sorts to return the OTP code via rest instead of email. I'm cautious about doing this because a slip-up could end up with that code in prod and big 'ol security risky.
Yes, I'll need to do some research on sharing debug configs, but there is definitely a way to do it.
The service runs and works without the API Key, but if you want to work on the specific email-based OTP implementation, you'll need an API Key -even for their Sandbox. If we publicly share a Sandbox key, it'll get shut off sooner than later.
Oh yea we're definitely not doing that.
There is not a great alternative since all SMTP services will require similar, other than including a debug flag of sorts to return the OTP code via rest instead of email. I'm cautious about doing this because a slip-up could end up with that code in prod and big 'ol security risky.
I've only done a little bit of preliminary research, but my thought process was about whether or not we could run an emulator locally. For example, when running locally, direct it to a SMTP server running in Docker instead of Sendgrid's API.
localstack has a local version of AWS SES, but it's only in the Pro version, which presents the same problem: developers would need a license and access key.
Just something to be thinking about.
Good idea on adding a smtp docker container! Moving to a dedicated issue in l0-auth for this (https://github.com/tiki/l0-auth/issues/21)
@timoguin's request: here are the basic instructions for getting started developing with TIKI for
tiki-sdk-dart
>=2.17.0 <3.0.0
at time of writing stable version is 2.18.6.
dart pub get
from the root of the projectdart test test
tiki-sdk-flutter
>=2.18.2 <3.0.0
and flutter version >=3.3.4
at time of writing stable versions are 2.18.6. & 3.3.10
note: to build for Android or iOS requires also installing Android Studio and/or XCode. Run flutter doctor
to check your local dependenciesflutter pub get
from the root of the projectflutter test integration_test
tiki-sdk-android
./gradlew clean build
from the root of the project-[Optional] Run unit tests from the root of the project ./gradlew test
and see reports under /app/build/reports/tests/
-[Optional] Run integration tests from within the integration_tests/
folder with ./gradlew connectedAndroidTest
and see reports under /app/build/reports/tests/
/integration_tests/build/reports/androidTests/
.
note: Requires a connected android device or emulator
tiki-sdk-ios
-[Optional] Run integration tests by opening the integration_tests subproject in Xcode. Open Test Navigator and Run the IntegrationTests
parent (right click or press run button in menu, not the scheme run button)
console & tiki.github.io
npm install
from the root of the projectnpm run dev
from the root of the project and in a browser navigate to http://localhost:3000
Create a standard contributors file to be included in each repo