LinkedIn#
Lets people sign in with their LinkedIn account, through "Sign In with LinkedIn using OpenID Connect" rather than LinkedIn's retired profile API. Last checked against LinkedIn's documentation on 31 October 2026.
Set it up#
Run
leptoskit auth provider add linkedin. It adds:[auth.providers.linkedin] client_id_env = "LINKEDIN_CLIENT_ID" client_secret_env = "LINKEDIN_CLIENT_SECRET"In LinkedIn's developer portal, create an app and add the "Sign In with LinkedIn using OpenID Connect" product.
On its Auth tab, add the Authorized redirect URLs
https://myapp.com/auth/callback/linkedin, andhttp://localhost:3000/auth/callback/linkedinfor development.Set
LINKEDIN_CLIENT_IDandLINKEDIN_CLIENT_SECRET.Turn on the
auth-providersfeature, and runleptoskit auth doctor.
What sign-in gets#
LinkedIn's ID token: a stable ID for the person, their name and picture, and their email address with LinkedIn's email_verified flag. leptoskit asks for the openid, profile, and email scopes.
LinkedIn's ID tokens leave out the nonce that other providers echo back. leptoskit accepts that for LinkedIn alone: the token comes straight from LinkedIn's token endpoint, for a code that only finishes in the browser that started the sign-in. A token that does carry a nonce must carry the right one.
Platforms#
It works on the web, and in iOS, macOS, and Android apps through the system browser, with the same redirect URIs: the browser comes back to your site, which sends it on to the app. See Sign-in for each platform.