Learn how to integrate your cloud ebook or library with FusionAuth, for a better user login experience.
What is FusionAuth
FusionAuth provides secure SSO (Single Sign-On) on the cloud, linking all your apps, logins, and devices into a unified space. It gives access to many applications with a single login.
After enabling FusionAuth SSO, FusionAuth users will be able to seamlessly log into your library or cloud ebook without entering a password, under one of these two conditions:
- They are already added as users to your library or cloud ebook manually (e.g. through Kotobee Author)
- You have your library or cloud ebook enabled for self-registration
Steps to Use FusionAuth SSO
In order to use FusionAuth for Single Sign-On, you need to have a FusionAuth account.
To enable SSO for your library or cloud ebook, follow the instructions below.
Create a FusionAuth Application
Have your library or ebook app URL ready.
If your library or ebook app is hosted with Kotobee, then the URL will be in the form of https://yoursubdomain.kotobee.com. Otherwise, it will be the URL that you have exported your library or ebook app files to. That URL will be referred to in some of the steps below as YOUR_URL.
- Add a new Tenant from your Admin Dashboard > Tenants > Add
- Add a new Application from Admin Dashboard > Applications > Add
- Select your Tenant
- Click OAuth tab
Under the Authorized redirect URLs, add the following URLs:
YOUR_URL/?provider=fusionauth&callback=
- Under Authorized request origin URLs enter YOUR_URL
- Under Enabled grants check the following options:
- Authorization Code
- Implicit
- Refresh Token
Add Users
- Add users from your Admin Dashboard > Users > Add:
Right after adding the above user, click Add registration:
Enable CORS
- Go to Admin Dashboard > Settings > System > CORS
- Check Enabled
- Check Allow credentials
- Add the followin Allowed headers:
- Accept
- Allowed headers
- Access-Control-Request-Headers
- Access-Control-Request-Method
- Authorization
- Content-Type
- Last-Modified
- Origin
- X-FusionAuth-TenantId
- X-Requested-With
- Check the followin Allowed methods:
- GET
- POST
- PUT
- DELETE
- HEAD
- OPTIONS
- Set Allowed origins to YOUR_URL
- Add the followin Exposed headers:
- Access-Control-Allow-Origin
- Access-Control-Allow-Credentials
Get Important Fields
You need three fields to identify your FusionAuth developer account: the Client ID, Tenant ID, and the FusionAuth Domain. These values will be entered in Kotobee Author.
Go to Admin Dashboard > Applications and find your application from the list. Then click View icon.
Scroll down near OAuth configuration section
Scroll down to find the Client ID in the OAuth configuration section. Have that copied for later use.
Go to Admin Dashboard > Tenants and find your tenant from the list. Then click View icon.
Find the ID and have that copied for later use.
Enable Fusion SSO in Kotobee Author
Open Kotobee Author. Go into your library or cloud ebook settings, and click on the SSO tab.
Click on the Enable button under FusionAuth.
Enter the Client ID, Tenant ID and Fusion Domain and hit Save Changes at the bottom.
You do not need to re-export your library or ebook app if you enable or disable SSO. The reader will pick up this change automatically,