Zac Mac
Zac Mac
@its-dibo , try adding the Vercel Edge Runtime Polyfill (https://edge-runtime.vercel.app/packages/ponyfill) package: ```bash pnpm add @edge-runtime/ponyfill ``` then to use it: ```js import { crypto } from '@edge-runtime/ponyfill' ```
Here is an example of ChatGPT using Auth0 for a web browser based mobile login flow: https://github.com/DiscipleTools/disciple-tools-theme/assets/191707/74a70def-5382-4f89-bd42-01c0720fdeb1
Here is a ref to the Auth0 docs: - https://auth0.com/docs/get-started/authentication-and-authorization-flow/device-authorization-flow/mobile-device-login-flow-best-practices OAuth2 has a similar flow: - https://oauth.net/2/native-apps/
For our purposes, since we also want to support a `refresh_token`, then we could probably just use the same endpoint (and `grant_type=refresh_token`): https://developer.okta.com/docs/reference/api/oidc/#token So, when that endpoint is accessed with...
> THanks @zdmc23 > > > > would the refresh_token be able to happen in the background, so the user would not experience the redirects? @corsacca Yes, with each API...
https://github.com/DiscipleTools/disciple-tools-theme/assets/191707/69c45247-6f23-4821-b08c-79d08b5fbfde
@corsacca I think we can make this work without many changes. It relies on the `redirect_to` parameter at login: https://example.com/wp-login.php?redirect_to=/wp-json/jwt-auth/v1/token Upon successful login (whether standard username/password, MFA, SSO, whichever plugins...
A couple of notes: 1. the Redirect URI for the App probably needs to be configurable (not sure whether you have any preferences on where that belongs): - For Dev,...
Some other related things to eventually discuss, but not urgent: - the current access token is set to expire by default after 1 week. We could probably make that shorter...
https://github.com/DiscipleTools/disciple-tools-theme/assets/191707/1b79b700-d872-4f98-aa00-c65ffc4cdf51 ^ sorry, I realized the prev video did not show the actual WP login form flow (bc of a prev login attempt caching the cookie into the ios jar),...