getUserIdentityToken() not resolving
Hello,
I am trying to use Single Sign-On with my Sky addin, but when I call client.getUserIdentityToken() I cannot get the Promise to resolve.
My code is as follows:
var client = new window.BBSkyAddinClient.AddinClient({…}) <-- This all works
client.getUserIdentityToken( ).then((token) => {
var userIdentityToken = token;
console.log(token)
})
It never reaches the inside of .then( ). When I log the client itself, I see that the client object populates authTokenRequests and changes lastAuthTokenRequestId to 1, but I cannot get the token itself.
Any ideas why?
Thanks,
Kevin
Comments
-
Hi @Kevin Li - does this happen for a particular extension point, or do you see the problem with any type of add-in (extension point)? Are there any additional errors in the browser console that seem related to the AddinClient?
0 -
Hi @Michael Tims - I have tested with the extension points “Development Office Home Action (Preview)”, “Constituent Page Action (Preview)”, and “Page (Preview)” (since the first 2 Addin navigate to the Page addin). They all behave the same.
I am not receiving any other errors in my console related to the AddInClient.
Here is an image of my AddInClient if it helps.
Another thing to note is that I have client.navigate( ) working for the buttonClick, so the client itself is working.
0 -
@Michael Tims
Here are my console logs:
0 -
@Kevin Li - thank you for the information! I have logged a bug with our team within Blackbaud to fix the problem. These extension points appear to not be properly wired up to handle the identity token request. I will keep you posted on the progress - no need to file a bug with Support, I plan to work on a fix this week. Thanks!
0 -
Hi @Kevin Li - after a bit more troubleshooting, it does actually look like the extension points are generally working for the fetching of identity token.
A couple other questions and things to try:
- Are you using the latest version of the sky-addin-client package? https://www.npmjs.com/package/@blackbaud/sky-addin-client
- Please update to v1.2.0 if not already on the latest.
- To rule out any timing-related issues, are you able to fetch the token if you make the call on the button click, so for example in the Development Office Home Action button click?
1 - Are you using the latest version of the sky-addin-client package? https://www.npmjs.com/package/@blackbaud/sky-addin-client
-
- I have updated to v1.2.0, was previously using v1.1.5.
- I have figured out a few ways to make the call work:
- Calling it in the callbacks init function
- Calling it in buttonClick function
- Calling it in a setTimeout( ) with ≥1ms delay
Thanks for your help. On another note, after validating the token, will I be able to use this token to make SKY API calls?
0 -
Calling it in the callbacks init function
Yes, that's right. My bad, I should've seen that. You need to wait until the init callback occurs before you can fetch the identity token. init indicates that the host page and add-in client have initialized their communication and the host page can now receive calls from the client.
On another note, after validating the token, will I be able to use this token to make SKY API calls?
No, the identity token is used to support SSO between a user in your system and a Blackbaud user. Here's the Add-in SSO documentation. And here is the documentation to connect your add-in to SKY API.
3 -
@Michael Tims
Thank you for your help and information. I honestly should have seen this myself as well so I don't blame you. The documentation is a little misleading though as the example made me think that I wouldn't have to wait for the init callback to finish.0
Categories
- All Categories
- 6 Blackbaud Community Help
- 206 bbcon®
- 1.4K Blackbaud Altru®
- 394 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 357 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 561 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 934 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.4K Blackbaud Raiser's Edge NXT®
- 3.6K SKY Developer
- 242 ResearchPoint™
- 117 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 238 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 28 PowerUp Challenges
- 3 (Open) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 777 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
