Skip to content

CORS error in Marketplace login with WebGL #1100

@juans-chainsafe

Description

@juans-chainsafe

Describe the bug
The issue only appears with WebGL build, is after you click send email button in the marketplace login prefab, because is failing on the API endpoint.

Steps
Steps to reproduce the behavior:

  1. Create a sample scene with MarketplaceLogin.prefab inside
  2. Use SampleLogin - Connect wallet scene
  3. Build with WebGL
  4. Login with web3auth or metamask
  5. Set email input and click Send email button

Expected behavior

  • Verification code screen appears and the email with the code is received

Console errors

localhost/:1 Access to fetch at 'https://api.chainsafe.io/api/v1/user/email' from origin 'http://localhost:51115' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.Understand this error
webgl22.loader.js:1 
        
POST https://api.chainsafe.io/api/v1/user/email net::ERR_FAILED

Screenshots/Video
Screenshot 2024-08-13 at 1 39 36 PM

Desktop (please complete the following information):

  • Chainsafe SDK version: [dev]
  • Unity Version: [e.g., 2022.3.26]
  • Operating System: [Mac]

Additional context
Please add any other relevant context or information about the problem. This could include device specifications, project configuration, or any other details that might be helpful in diagnosing the issue.

Metadata

Metadata

Assignees

Labels

Priority: P2Added to issues and PRs relating to a medium severity bugs.Type: BugAdded to issues and PRs if they are addressing a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions