Skip to content

Commit

Permalink
fix: fix the domain origin (#36)
Browse files Browse the repository at this point in the history
Co-authored-by: Apostolos GALANOPOULOS <[email protected]>
  • Loading branch information
vafeini and Apostolis-Galanopoulos authored Feb 5, 2024
1 parent dccf103 commit 947b6c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/core/services/online-authentication-siop.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class OnlineAuthenticationSIOPService {
'nonce': 'nonce'
};
if (!this.deviceDetectorService.isDesktop()) {
dataRequest['wallet_response_redirect_uri_template'] = environment.apiUrl+'/get-wallet-code/?response_code={RESPONSE_CODE}';
dataRequest['wallet_response_redirect_uri_template'] = location.origin+'/get-wallet-code/?response_code={RESPONSE_CODE}';
}
return this.httpService.post<PresentationDefinitionResponse, {type: string, 'id_token_type': string, 'nonce': string}>
('ui/presentations', dataRequest)
Expand All @@ -36,7 +36,7 @@ export class OnlineAuthenticationSIOPService {
initCborTransaction (): Observable<PresentationDefinitionResponse> {
const payload: any = PID_PRESENTATION_DEFINITION;
if (!this.deviceDetectorService.isDesktop()) {
payload['wallet_response_redirect_uri_template'] = environment.apiUrl+'/get-wallet-code?response_code={RESPONSE_CODE}';
payload['wallet_response_redirect_uri_template'] = location.origin+'/get-wallet-code?response_code={RESPONSE_CODE}';
}
return this.httpService.post<PresentationDefinitionResponse, any>('ui/presentations', payload)
.pipe(
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/presentation-definition.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class PresentationDefinitionService {
if (requestCode && isJSON(requestCode)) {
const payload = JSON.parse(requestCode);
if (!this.deviceDetectorService.isDesktop()) {
payload['wallet_response_redirect_uri_template'] = environment.apiUrl+'/get-wallet-code?response_code={RESPONSE_CODE}';
payload['wallet_response_redirect_uri_template'] = location.origin+'/get-wallet-code?response_code={RESPONSE_CODE}';
}
this.httpService.post<PresentationDefinitionResponse, string>('ui/presentations', payload)
.pipe(
Expand Down

0 comments on commit 947b6c4

Please sign in to comment.