gorgeous-motorcycle-71764
07/02/2025, 6:35 AMbrief-egg-61061
07/02/2025, 6:35 AMbrief-egg-61061
07/02/2025, 6:35 AM@ory/client
for JavaScript or ory/client-go
for Go) are primarily for managing OAuth2 clients and interacting with Ory's admin and public APIs, not for handling the OAuth2/OIDC flow itself. For the actual flow (authorization, token exchange, etc.), use the libraries above. This is explicitly recommended in the Ory documentation: "The Ory Hydra SDK doesn't provide a comprehensive API for handling OAuth 2.0 flows such as the authorization code flow and refresh flow. Use one of the many well-established libraries for this purpose, don't write your own code to interact with OAuth 2.0" [Popular OAuth2 client libraries](https://www.ory.sh/docs/hydra/guides/using-oauth2). For mobile and SPA clients, Ory specifically recommends [AppAuth](https://appauth.io/) for Android and iOS, which supports PKCE and public clients [OAuth2 with PKCE for mobile apps and single page apps](https://www.ory.sh/blog/oauth2-for-mobile-app-spa-browser). In summary: Use a standard OAuth2/OIDC client library for your language/platform to implement the OAuth2 flow with Ory. Use Ory's SDKs for client management and admin tasks, not for the OAuth2 flow itself.gorgeous-motorcycle-71764
07/02/2025, 6:36 AMbrief-egg-61061
07/02/2025, 6:36 AMbrief-egg-61061
07/02/2025, 6:36 AMtoken_endpoint_auth_method
set to none
[SPA and public client with PKCE](https://www.ory.sh/docs/oauth2-oidc/authorization-code-flow#spa-and-public-client-with-pkce). Ory also emphasizes using established, open-source libraries rather than rolling your own implementation [Popular OAuth2 client libraries](https://www.ory.sh/docs/hydra/guides/using-oauth2). In summary: Use a well-established OAuth2/OIDC client library such as node-openid-client or AppAuth for your SPA, and implement the Authorization Code Flow with PKCE.