Shopify / Shopify/shopify-app-template-node
Using Postman to test backend endpoints
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 434
- PR merge metrics
- No merged PRs in 30d
Description
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:
- The aforementioned
PORTis 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) - 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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Express application’s PORT handling, the /api/endpoint entry point, and the app bridge-to-admin-panel token flow described in the issue. Done means documenting why the local port changes, whether it can be made static, and how to obtain or use a suitable session token for Postman requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, javascript, node.js
- Domain
- api, authentication, backend, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100