Update README.md to add some missing details in examples #3254
+5
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I built an example and ran into a few small omissions in the examples here, that might make it difficult for a new developer not incredibly familiar with OAuth internals to figure out why their example doesn't work.
My recommended changes to
README.md
:Each
JoseKey.fromImportable
call requires a key ID (parameter 2). Recommended change:Otherwise, it fails silently in testing (localhost) and fails with an error in production (because kid is missing on each key in jwks.json).
Scope requires
atproto transition:generic
for the code example that follows, would recommend adding the scope line back in as:Otherwise, the example that follows this (login) will not work, transition:generic is required for that.
This is required in the example given:
Otherwise an error is thrown. Recommend adding this line.
Not included, if you wanted to include it, is a little in-memory store to complete the example.
But, I did not include this, you might have an existing library in mind or not want to give an easier option than the redis session store example.
Feel free to add if you think it improves things.