Ends in:
2 DAYS
10 HRS
33 MIN
15 SEC
Ends in:
2 D
10 H
33 M
15 S
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 ?

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

  • 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

  • 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

  • User Avatar
    0
    lizhaofeng created

    hi

    The issue is resolved when using https.

    Thanks。

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35