Skip to content

Commit

Permalink
Add wallet custom scheme for issuance to avoid problem of browser sup…
Browse files Browse the repository at this point in the history
…port

#3229
  • Loading branch information
hawkbee1 committed Jan 18, 2025
1 parent a975da5 commit 5db50f0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="openid-vc" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="altme-openid-credential-offer" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down
10 changes: 10 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@
<string>openid-vc</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>openid</string>
<key>CFBundleURLSchemes</key>
<array>
<string>altme-openid-credential-offer</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
Expand Down
2 changes: 1 addition & 1 deletion lib/app/shared/constants/constants_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ abstract class ConstantsJson {
'client_secret_basic',
'client_secret_jwt',
],
'credential_offer_endpoint': ['openid-credential-offer://', 'haip://'],
'credential_offer_endpoint': ['openid-credential-offer://', 'haip://', 'altme-openid-credential-offer'],
'client_name': '${Parameters.appName} wallet',
'contacts': ['[email protected]'],
};
Expand Down
1 change: 1 addition & 0 deletions lib/app/shared/helper_functions/helper_functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ bool isOIDC4VCIUrl(Uri uri) {
bool isSIOPV2OROIDC4VPUrl(Uri uri) {
final isOpenIdUrl = uri.toString().startsWith('openid://?') ||
uri.toString().startsWith('openid-vc://?') ||
uri.toString().startsWith('altme-openid-credential-offer://') ||
uri.toString().startsWith('openid-hedera://?') ||
uri.toString().startsWith('haip://?') ||
uri.toString().startsWith('haip://authorize?');
Expand Down

0 comments on commit 5db50f0

Please sign in to comment.