-
Notifications
You must be signed in to change notification settings - Fork 4
feat: support Flow Secret for embedded flows #9
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,14 +8,28 @@ Demonstrates a native Android flow using the ThunderID Compose SDK: | |
|
|
||
| ## Setup | ||
|
|
||
| Copy `.env.example` to `.env` and add your ThunderID credentials: | ||
| Copy `config.properties.example` to `config.properties` (gitignored) and add your ThunderID credentials: | ||
|
|
||
| ``` | ||
| THUNDERID_BASE_URL=https://localhost:8090 | ||
| THUNDERID_CLIENT_ID=your-client-id | ||
| THUNDERID_APPLICATION_ID=your-application-id | ||
| THUNDERID_AFTER_SIGN_IN_URL= | ||
| THUNDERID_AFTER_SIGN_OUT_URL= | ||
| THUNDERID_FLOW_SECRET=your-flow-secret | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a meaning of flow secret for a mobile client?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is when they not using attestation. In that case they have to go with the secret.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once they configure the attestation, secret will be skipped and attestation will be validated.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't we just mention something like
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean instead of FLOW_SECRET value? If yes, in the attestation case we need to have some more parameters here (This will be sent via separate PR). So having a common name for both attestation and secret will confuse users IMO.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Public clients usually can't securely hold a secret. My concern is, calling this |
||
| ``` | ||
|
|
||
| - `THUNDERID_APPLICATION_ID` and `THUNDERID_FLOW_SECRET` come from your application's page in the ThunderID | ||
| console (**Applications → your app → General**). The Flow Secret is only shown in plaintext at creation | ||
| time — if you didn't copy it then, regenerate it from the same page. | ||
| - `THUNDERID_CLIENT_ID` is only needed if you switch this sample to the redirect-based OAuth flow; the | ||
| embedded Flow Execution API used here (sign-in and sign-up) doesn't require it. | ||
|
|
||
| To let users self-register, enable self-registration in **both** places in the console — it's disabled by | ||
| default in either and the flow fails until both are turned on: | ||
| 1. The application's settings (registration flow enabled for this app). | ||
| 2. The user type assigned to the application (self-registration enabled for that user type). | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| ## Run | ||
|
|
||
| Open in Android Studio, sync Gradle, and run on an API 24+ emulator or device. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we double check changes done to readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to use the config.properties file and using .env didn't worked for me. That's why this update.
cc: @brionmario can you confirm this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also in the repo we don't have env.example file too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config.propertiesis the right approach. I think README wasn't updated.