Open Closed

How to configure OpenIdDict in a production environment for React Native? #6159


User avatar
0
lizhaofeng created
  • ABP Framework version: v7.4.1
  • UI Type: MVC & React Native
  • Database System: MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

The API service is deployed at http://192.168.1.21:44376

  1. How to configure the environment in React Native?
  2. How to configure RedirectUris for OpenIdDict ?
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Configure the oAuthConfig in the Environment.js of the React app. Configure the URLs in the appsettings.json of the DbMigrator app.

    https://docs.abp.io/en/abp/latest/Deployment/Configuring-OpenIddict

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    lizhaofeng created

    hi maliming,

    1.The OpenId

    2.RN config

    3.Encountering a 400 error after logging in.

    AuthService Log https://gist.github.com/zhaofenglee/3f784b2e7adf88c26ea8cd782a4a3d52

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    2023-11-13 11:06:04.944 +08:00 [INF] Antiforgery token validation failed. The provided antiforgery token was meant for a different claims-based user than the current user. 2023-11-13 11:06:04.949 +08:00 [INF] Executing StatusCodeResult, setting HTTP status code 400

    This error has nothing to do with openiddict.

    This is usually a problem with cookies. Please check the message from the browser console. Or try to use https

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    lizhaofeng created

    hi

    The issue is resolved when using https.

    Thanks。

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.