Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Postman to test backend endpoints #1259

Open
1000p opened this issue Apr 15, 2023 · 2 comments
Open

Using Postman to test backend endpoints #1259

1000p opened this issue Apr 15, 2023 · 2 comments

Comments

@1000p
Copy link

1000p commented Apr 15, 2023

Our express application is started listening on a PORT.
Using it I can call localhost:PORT/api/endpoint .
This of course fails if I do not provide a valid Bearer token.
Inspecting network calls to my application from the store admin uses Bearer authentication with JWT token that changes every time I reload the app screen or every one minute. Using it the request succeeds.

I have couple of questions:

  1. The aforementioned PORT is changing every time the application is restarted. Checking the Ngrok tunnel forwarding address the port seems to differ. Why it differs? Is there a way of making this port static for local developments? How? (Multiple questions but related, sorry)
  2. From what I understood the flow is as follow: User enters the app screen (in the Admin panel) -> FE loads skeleton-> FE sends request to app bridge -> app bridge grants session token (JWT) to FE -> FE uses token to authenticate with app BE.
    Any way to create a session token that does not expire or has a long expiration time so I can fire requests from Postman more easily?
@SachinBahukhandi
Copy link

Hey did you find a solution to this?

@1000p
Copy link
Author

1000p commented Jan 27, 2024

Hey did you find a solution to this?

Unfortunately, no.

@1000p 1000p closed this as completed Jan 27, 2024
@1000p 1000p reopened this Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants