logto-io / js

🤓 Logto JS SDKs.
https://docs.logto.io/quick-starts/
MIT License
61 stars 40 forks source link

feat(next): add getAccessToken and getOrganizationToken for pages router #782

Closed wangsijie closed 1 month ago

wangsijie commented 1 month ago

Summary

add getAccessToken and getOrganizationToken methods for pages router

Users can now use getAccessToken(request, response, 'resource-indicator') to get access token directly in your pages router. And getOrganizationToken is also available to get organization token.

This PR also updates the sample project, and remove some content to keep it simple.

Testing

Unit tests and local tested.

Checklist