Skip to content
pubscout

signin_with_linkedin

2.0.1, released 2 years ago by aubergine.co

Authenticate users with LinkedIn and retrieve secure profile data in Flutter.

WASM-ready
$ flutter pub add signin_with_linkedin
Source repository

What it does

A Flutter package that enables LinkedIn authentication using OpenID Connect. It allows users to sign in, retrieve authorization codes, access tokens, and user profile data across multiple platforms including Android, iOS, web, and macOS.

AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to allow users to sign in to your Flutter app using their LinkedIn accounts.
  • You need to securely retrieve LinkedIn user profile data.

Skip it when

  • You are using the deprecated 3-legged OAuth flow without the v2/userinfo endpoint.
  • You require a built-in pre-designed Sign in with LinkedIn button widget.

Strengths

  • Supports multiple platforms including Android, iOS, Web, and macOS.
  • Uses the updated v2 OpenID Connect flow instead of deprecated legacy methods.
  • Provides granular methods for authorization codes, access tokens, and user info.

Weaknesses

  • Web support is limited to getting the authorization code due to CORS restrictions, requiring a backend for direct REST API calls.
  • Does not include predefined UI buttons or widgets.

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
5

Requires creating an app on the LinkedIn Developer Portal with a company page, enabling 'Sign In with LinkedIn using OpenID Connect', configuring redirect URLs, and setting up web redirects for the web platform.

final linkedInConfig = LinkedInConfig(
  clientId: '<<CLIENT ID>>',
  clientSecret: '<<CLIENT SECRET>>',
  redirectUrl: '<<REDIRECT URL>>',
  scope: ['openid', 'profile', 'email'],
);

final linkedin = SignInWithLinkedIn(config: linkedInConfig);

final (authCode, error) = await linkedin.getAuthorizationCode(context: context);

Alternatives

Packages that do the same job and could replace signin_with_linkedin.

Works with

Packages commonly used together with signin_with_linkedin: ones it builds on, ones built on it, and its own family.