This is a firebase project uses Casdoor as provider example.
Go to Firebase Console to create a project.
You need to enable "Identity Platform" feature first to enable OIDC integration on Firebase.
Select OpenID Connect
in Custom providers, fill in the following information:
Name (in order) | Description | Example value |
---|---|---|
Name | Any be any string you would like | casdoor |
Client ID | Client ID for the Casdoor application | 294b09fbc17f95daf2fe |
Issuer (URL) | Casdoor server URL | https://door.casdoor.com |
Client Secret | Client secret for Casdoor application | dd8982f7046ccba1bbd7851d5c1ece4e52bf039d |
The above examples values can be retrieved from Casdoor demo site: https://door.casdoor.com/applications/casbin/app-vue-python-example
Add Callback URL to Casdoor application Redirect URLs:
Create a Web app
first:
Copy your project config in project settings to src/setting.js
. (the following config is our demo site, which can be used for testing. Change it to your own for production use)
const firebaseConfig = {
apiKey: "AIzaSyDG8HGY9ULBqXPMIkYEdcOSm2_Yls1E5yY",
authDomain: "fb-casdoor.firebaseapp.com",
projectId: "fb-casdoor",
storageBucket: "fb-casdoor.appspot.com",
messagingSenderId: "174511522903",
appId: "1:174511522903:web:8649d465718acfac900f12",
measurementId: "G-8N504216FH"
};
yarn install
yarn start