$linuxjunkies
>

OAuth callback

also: redirect URI, redirect URL, authorization callback

A URL endpoint that an OAuth server redirects a user to after authentication, typically passing an authorization code that the application exchanges for an access token.

An OAuth callback (also called a redirect URI) is a web address controlled by your application where the OAuth provider sends the user after they've authenticated. When a user logs in via a third-party service like Google or GitHub, that service redirects them back to your callback URL with an authorization code in the query string.

Your application receives this code and exchanges it server-to-server with the OAuth provider for an access token, which allows your app to access the user's data on their behalf. For example, if a user clicks "Sign in with Google", they're sent to Google's login page, and after authentication, Google redirects them to https://myapp.com/auth/callback?code=xyz123.

The callback URL must be registered with the OAuth provider beforehand for security reasons—this prevents attackers from redirecting the authorization code elsewhere. In Linux web development, callback endpoints are commonly defined in frameworks like Node.js (Express), Python (Flask, Django), or Ruby (Rails).

Related terms