A Flutter package that helps to Sign in with LinkedIn
It also supports Flutter Web
.
v2
flow of Sign in - Sign In with LinkedIn using OpenID ConnectSettings
tab. you should see Verified
with the date in App Settings.Auth
tab, set the Authorized redirect URL
for the app.
Products
tab, Request access
for Sign In with LinkedIn using OpenID Connect
// Modify the "scope" below as per your need
final _linkedInConfig = LinkedInConfig(
clientId: '<<CLIENT ID>>',
clientSecret: '<<CLIENT SECRET>>',
redirectUrl: '<<REDIRECT URL>>',
scope: ['openid', 'profile', 'email'],
);
signIn
method.onGetUserProfile
is required to get user profile data.onGetAuthToken
callback if you want to use access token related data.SignInWithLinkedIn.signIn(
context,
config: _linkedInConfig,
onGetAuthToken: (data) {
log('Auth token data: ${data.toJson()}');
},
onGetUserProfile: (user) {
log('LinkedIn User: ${user.toJson()}');
},
onSignInError: (error) {
log('Error on sign in: $error');
},
);
await SignInWithLinkedIn.logout();
signin_linkedin.html
in your website's root folder and deploy it on server. It is required to make a callback to dart code after complete the login with LinkedIn on web.https://your-website/signin_linkedin.html
button/widget
for Sign in with LinkedIn
. You can create your own UI for the sign in button.