1 min read

Different URL between Okta OAuth 2.0 login and logout

The URL used for Okta OAuth 2.0 login and logout, or other API endpoints, could be different.

The Okta API documentation mentions the same ${baseUrl} for all the endpoints. For instance, ${baseUrl}/v1/authorize to login, ${baseUrl}/v1/logout to logout, and ${baseUrl}/v1/userinfo for user information.

While working for a client’s project, after a successful login, I started receiving a 404 not found error for other endpoints, like /logout and /userinfo.

It looks like some Okta implementations require a different baseUrl, in this client’s specific case it’s oauth2/.

Thus, if you get a 404 not found error for your logout endpoint, try to add oauth2/to the URL: https://${baseUrl}/oauth2/v1/logout.

Wanna stay up-to-date with Flutter and Dart?

Subscribe to get a weekly email with the best articles about Flutter and Dart.

    We won't send you spam. Unsubscribe at any time.