Instagram API uses OAuth 2.0 protocol for authentication and authorization. All of the requests are made over SSL. Instagram authentication requests require an access token.
Create an Instagram App & Get Client ID & Client Secret
In order to use Instagram for social logins we need to first create an Instagram app and get the client id and client secret by following the steps below:
Add Instagram Test User to App
To add our Instagram test user to our app:
Configure in ForgeRock Access Management
We now need to create an authentication module and then an authentication chain which will use the Instagram authentication module.
After the Instagram app is created with client id and client secret:
3. Select “Create”
4. Field values:
Can also be just user_profile
Note that this link is automatically generated by ForgeRock, but must match your valid redirect URL specified in Facebook.
5. Account Mapper Configuration: id=uid
6. Attribute Mapper Configuration: username=givenName id=uid username=sn (can be customized according to your setup)
Instagram will only return id, and username. If email is required for an account, disable “Create account if it does not exist”. Also, disable “Prompt for password setting and activation code”
7. OpenID Connect validation configuration type: client_secret
8. Go to Authentication > Chains
9. Add Chain
Name: InstagramChain
10. Add a Module
11. Select “Instagram” module. “Select Criteria” can be set to optional.
Add Login Icon
After creating the new module and chain in ForgeRock, we need to add a login icon on the main page of the website that ForgeRock Access Management is protecting. The steps are as follows:
If you do not wish to place an icon, leave the “value” to be blank.
5. In the Enabled Implementations section, add “Instagram” as a new value.
To see the Instagram logo, you will need to logout of the app being protected. You should then see the Instagram logo on the login page. If you don’t see it, restart your instance.
Congratulations, you should now be able to use your new Instagram social authentication.
Note: A blog entry was originally written in 2016, providing instruction for all the steps (from start to end) on using Instagram for Social Login in ForgeRock Access Management. In this blog entry, we have updated the instructions to be compatible with ForgeRock Access Management version 7.0 and the current version of Instagram.