@lunch-money/developer-docs 2.11.2-preview.2 → 2.11.2-preview.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,7 +21,7 @@ Use a sample application to see Lunch Money OAuth working end to end before you
|
|
|
21
21
|
> The sample uses a fixed demonstration user and in-memory stores. It does not provide real application authentication, durable multi-user isolation, production credential storage, deployment configuration, or operational controls. Review its [security guidance](https://github.com/lunch-money/lm-oauth-confidential-node-example/blob/main/SECURITY.md) and [production checklist](https://github.com/lunch-money/lm-oauth-confidential-node-example/blob/main/PRODUCTION_CHECKLIST.md) before adapting any part of it.
|
|
22
22
|
|
|
23
23
|
<!-- BEGIN GENERATED OAUTH SAMPLE WALKTHROUGH -->
|
|
24
|
-
<!-- Source: lunch-money/lm-oauth-confidential-node-example@
|
|
24
|
+
<!-- Source: lunch-money/lm-oauth-confidential-node-example@c8e4d8338d430a3247a48d6e017aaf68d84bd832:docs/WALKTHROUGH.md -->
|
|
25
25
|
## Try OAuth with your Lunch Money account
|
|
26
26
|
|
|
27
27
|
Use this walkthrough to authorize a real Lunch Money OAuth client, call the Lunch Money API, optionally refresh its credentials, revoke access, and repeat the flow. The sample is a confidential, server-side web client built with Node.js and TypeScript.
|
|
@@ -93,10 +93,10 @@ In the same terminal, set the client ID and secret from the Developer Portal:
|
|
|
93
93
|
export OAUTH_CLIENT_ID='YOUR_CLIENT_ID'
|
|
94
94
|
export OAUTH_CLIENT_SECRET='YOUR_CLIENT_SECRET'
|
|
95
95
|
export OAUTH_REDIRECT_URI='http://localhost:4002/oauth/callback'
|
|
96
|
-
export LUNCH_MONEY_API_BASE_URL='
|
|
96
|
+
export LUNCH_MONEY_API_BASE_URL='{{LUNCH_MONEY_API_BASE_URL}}'
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
The
|
|
99
|
+
The Developer Portal replaces `{{LUNCH_MONEY_API_BASE_URL}}` with the API base URL for the environment where you registered the client. If you are reading this walkthrough in the sample repository, use the API base URL provided with your Lunch Money OAuth access. The sample uses that one value for OAuth discovery, token operations, and Lunch Money API requests. A real application should also use [OAuth discovery](https://lunchmoney.dev/oauth/authorization-code#configure-lunch-money-with-discovery) instead of hard-coding authorization, token, and revocation endpoint URLs. `PORT` is optional and defaults to `4002`.
|
|
100
100
|
|
|
101
101
|
`SESSION_SECRET` is also optional for this local sample. If it is absent, the process creates a new random cookie-signing secret when it starts. Because all browser sessions, authorization attempts, and credentials are held in memory and cleared on restart, the generated secret can be cleared at the same time. A production application must instead provide a strong `SESSION_SECRET`, keep it stable across restarts, and not rotate it for each OAuth authorization.
|
|
102
102
|
|
|
@@ -175,7 +175,7 @@ When access is still active, revoke it first through **Revoke and verify** or Lu
|
|
|
175
175
|
|
|
176
176
|
After the flow succeeds, connect each action you performed to the code that implemented it, then decide how those responsibilities fit into your own application.
|
|
177
177
|
|
|
178
|
-
Before adapting the code, read the repository's [OAuth code guide](https://github.com/lunch-money/lm-oauth-confidential-node-example/blob/
|
|
178
|
+
Before adapting the code, read the repository's [OAuth code guide](https://github.com/lunch-money/lm-oauth-confidential-node-example/blob/c8e4d8338d430a3247a48d6e017aaf68d84bd832/src/oauth/README.md), [security model](https://github.com/lunch-money/lm-oauth-confidential-node-example/blob/c8e4d8338d430a3247a48d6e017aaf68d84bd832/SECURITY.md), [production checklist](https://github.com/lunch-money/lm-oauth-confidential-node-example/blob/c8e4d8338d430a3247a48d6e017aaf68d84bd832/PRODUCTION_CHECKLIST.md), and [troubleshooting guide](https://github.com/lunch-money/lm-oauth-confidential-node-example/blob/c8e4d8338d430a3247a48d6e017aaf68d84bd832/TROUBLESHOOTING.md).
|
|
179
179
|
<!-- END GENERATED OAUTH SAMPLE WALKTHROUGH -->
|
|
180
180
|
|
|
181
181
|
## Understand and apply the teaching code
|