Sign In With Roboflow (Developer Reference)
OAuth reference, visibility, errors, and example app for Sign in with Roboflow.
Example app
git clone https://github.com/roboflow/siwr_example_app.git
cd siwr_example_app
cp .env.example .env
# Set RF_CLIENT_ID, RF_CLIENT_SECRET, SESSION_SECRET
npm install && npm run devRoute
Purpose
PKCE and authorize URL
export function pkcePair(): { verifier: string; challenge: string } {
const verifier = crypto.randomBytes(48).toString("base64url");
const challenge = crypto.createHash("sha256").update(verifier).digest("base64url");
return { verifier, challenge };
}
export function buildAuthorizeUrl(state: string, codeChallenge: string): string {
const url = new URL(`${config.appHost}/oauth/authorize`);
url.searchParams.set("response_type", "code");
url.searchParams.set("client_id", config.clientId);
url.searchParams.set("redirect_uri", config.redirectUri);
url.searchParams.set("scope", REQUESTED_SCOPE_STRING);
url.searchParams.set("state", state);
url.searchParams.set("code_challenge", codeChallenge);
url.searchParams.set("code_challenge_method", "S256");
return url.toString();
}Token exchange (server-side)
Callback: validate state
stateToken Endpoint Authentication
Method
How it works
Hosts
Service
Base URL
Visibility
Dashboard option
Who can sign in
Sign-in and tokens (app.roboflow.com)
Purpose
Method
URL
Notes
Using tokens on the REST API
Common errors
HTTP
Meaning
What to do
Security
Last updated
Was this helpful?