Refused to display 'https://oauth2.sky.blackbaud.com/...' in a frame because it set 'X-Frame-Options' to 'deny'
I'm trying to piece together a POC for a client. I've got my app created, all my keys in the right spots, callbacks and add in registered. I am able to execute the auth flow all the way thru and view test constituent data following the C# .NET Core example app (https://developer.blackbaud.com/skyapi/docs/authorization/auth-code-flow/code-samples). I was able to render the add in inside of a tile in the Constituent Tile Dashboard however I get the following error after clicking the login button: Refused to display 'https://oauth2.sky.blackbaud.com/authorization?client_id=&response_type=code&redirect_uri=' in a frame because it set 'X-Frame-Options' to 'deny'.
I'm obviously missing something to allow the authorization flow to occur via my add in, but I haven't been able to find any relevant discussions or examples.
Any assistance would be greatly appreciated.
I'm obviously missing something to allow the authorization flow to occur via my add in, but I haven't been able to find any relevant discussions or examples.
Any assistance would be greatly appreciated.
0
Comments
-
Hi Matthew,
For security reasons, we do not allow the OAuth consent page (or the Blackbaud ID sign-in form) to be rendered n an iframe. If your add-in doesn't already have an access token for the current user, you'll need to initiate the OAuth process in a separate window. You can launch the window from your add-in, and then watch for it to be closed (and your redirect URI page can include a button on the page to close the current window, or include script that closes the current window).. Once the window is closed, you can load your tile (pulling the access token from your backend).
More info here:
https://developer.blackbaud.com/skyapi/docs/addins/concepts/connect-to-skyapi#protection-against-clickjacking
https://developer.blackbaud.com/skyapi/docs/addins/howto-guides/addin-design/authentication#popup-dialog
Fair point about not finding any good examples - we'll work on publishing a demo of this technique.1 -
Thanks Ben!
I figured it was a security issue but thought the process was to authorize inside the addin to avoid confusion by the user. So, I kept trying different ways to make it work.
Matt0 -
So, I've run into another issue with this. When I initialize the popup and go thru the manual authorization piece it opens with a different session. So, by the time the user authorizes access and closes the popup the tokens are lost to the main application and my add-in. There isn't any indication in the tutorials that this is supposed to happen. I'm working around it by persisting the tokens to a db and fetching them from there on reload, but I'm still curious as to what I'm doing wrong in the first place.
Matt
0 -
@Matthew Shepherd
I'm aware this thread is a few years old now, but I was wondering if anyone ever answered your question here on if this is expected functionality or not. I have just started development of an Add-In for our institution and have run into the same issue. I am just about to start working on storing the session in a local db to retrieve when needed, but none of the official documentation talks about that as the expected model.0
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 403 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 656 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 939 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.6K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 249 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 241 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) 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
- 794 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
