Sign in with Passport
Overview
Sign in with Passport makes it easy for users to sign in to your apps and websites using their Passport ID.
Instead of filling out forms, verifying email addresses, and choosing new passwords, they can use Sign in with Passport to set up an account and start using your app right away.
All accounts are protected with two-factor authentication for superior security, and Passport will not track users’ activity in your app or website.
Use Sign In with Passport to:
Reduce friction and obtain more sign-ups by allowing members to Sign In with Passport, without having the need to create a new account.
Minimize the costs and time associated with implementing your own login, identity, profile management, and password management.
Getting Started
Authenticating Members
New members logging in to your service for the first time will need to follow the Authenticating with OAuth 2.0 Guide. When requesting an authorization code in Step 2 of the OAuth 2.0 Guide, make sure to request the identity.profile and/or identity.email scopes!
identity.basic
Required to retrieve the member's lite profile including their id, name, and profile picture.
identity.profile
Required to retrieve the member's complete public profile data.
identity.email
Required to retrieve the member's email addresses.
organizations.memberships
Required to retrieve the member's organizations.
After successful authentication, you will acquire an access token that can be used in the next step of the sign-in process.
If your application does not have these permissions, you can add them through the Developer Portal.
Retrieving Member Profiles
With your newly acquired access token for the authenticated member, you can use the following API request to retrieve the member's profile information.
Sample Request
curl -X GET 'https://auth.onepassport.eu/whoami' \
-H 'Authorization: Bearer {INSERT_TOKEN}'
Request Body
token
string
Required. The string value of the token returned using Client Credential Flow or Authorization Code Flow
Sample Response
{
"_id":"G3dpGzCrf7XRXwsf9",
"username":"john.doe",
"profile":{
"name":{
"first":"John",
"last":"Doe"
},
"uavatar":"//www.gravatar.com/avatar/43572c4f5cd2f4532a7c67cd529ceb4b?d=identicon"
}
}
Retrieving Member Email Addresses
In addition to the member's profile, you may be interested in retrieving the member's email address. The identity.email permission scope allows usage of the following API:
Sample Request
curl -X GET 'https://auth.onepassport.eu/whoami/emails' \
-H 'Authorization: Bearer {INSERT_TOKEN}'
Request Body
token
string
Required. The string value of the token returned using Client Credential Flow or Authorization Code Flow
Sample Response
{
"_id":"G3dpGzCrf7XRXwsf9",
"username":"john.doe",
"emails":[
{"address":"[email protected]"}
],
"profile":{
"name":{
"first":"John",
"last":"Doe"
}
}
}
Retrieving Member complete Profile
Use the API request below to retrieve the member's complete public profile. The identity.profile permission scope is required to use following API:
Sample Request
curl -X GET 'https://auth.onepassport.eu/whoami/profile' \
-H 'Authorization: Bearer {INSERT_TOKEN}'
Request Body
token
string
Required. The string value of the token returned using Client Credential Flow or Authorization Code Flow
Sample Response
{
"_id":"G3dpGzCrf7XRXwsf9",
"username":"john.doe",
"emails":[
{"address":"[email protected]"}
],
"profile":{
"name":{
"first":"John",
"last":"Doe"
}
}
}
Retrieving Member Organizations
In addition to the member's profile, you may be interested in retrieving the member's organizations. The organizations.memberships permission scope allows usage of the following API:
Sample Request
curl -X GET 'https://auth.onepassport.eu/whoami/organizations' \
-H 'Authorization: Bearer {INSERT_TOKEN}'
Request Body
token
string
Required. The string value of the token returned using Client Credential Flow or Authorization Code Flow
Sample Response
[
{
_id: 'a22c4ab2da67dd69f56833f7',
profile: {
name: 'Accelerace',
contact_email: '[email protected]',
logo: 'https://fundingbox-images.s3-eu-central-1.amazonaws.com/xurxo/86F8ggnch4/hpqdx4qkbjslrbmtyl45.png',
about: 'Accelerace is one of the world’s top 10 seed accelerators. Since 2008 Accelerace has spotted, trained and invested in more than 700 of the most promising Danish and international startups and growth companies. 88% of the companies are still on the market today.\n' +
'\n' +
'As partner in the national Scale-Up Denmark initiative, Accelerace scales startups within foodtech, edtech, cleantech, IoT, soundtech, fintech, future of work, medtech, biotech and digital health with help from experienced serial entrepreneurs, mentors, bootcamps and a vast network.\n' +
'\n' +
'Accelerace has in its lifetime invested more than 38.8 million USD in promising startups and has launched partnerships with the Novo Nordisk Foundation, Arla, COOP, Nordea, Nykredit, Danske Bank, Bang & Olufsen, Sound Hub Denmark, Arbejdernes Landsbank, Ørsted og Elia among others.\n' +
'\n' +
'Accelerace is also organizing the **Nordic NOME (Nordic Mentor Network for Entrepreneurship) mentor network** for life science startups. Read more on www.accelerace.io and www.nome.nu or via email: [email protected]',
industry: [Array],
location: 'Copenhagen, Hovedstaden, Denmark',
tagline: 'Home of the Nordic founders building the great companies of tomorrow',
website: 'https://www.accelerace.io',
tags: [Array],
technologies: [Array]
},
type: 'accelerator-incubator',
slug: 'accelerace'
}
]
Additional resources
Image resources
Download official Sign In with Passport button images in different sizes and formats for use within your site or application.
Last updated