Skip to main content

Posts

Showing posts with the label GraphQL

Cannot find options for the 'SitecoreIdentityJwtBearer' authentication type

The Problem We needed to disable identity server in Sitecore 10.4 instance. We followed the instructions mentioned on Sitecore portal here When we activated the \App_Config\Include\Examples\Sitecore.Owin.Authentication.IdentityServer.Disabler.config.example, we got  this error:  Cannot find options for the 'SitecoreIdentityJwtBearer' authentication type. The Solution We found that we also need to set the  authentication type  as  empty  for  GraphQL , through below configuration, when you disable the  identity server  in Sitecore. <?xml version="1.0" encoding="utf-8" ?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> <sitecore role:require="Standalone or ContentManagement"> <authoring> <graphql> <tokenValidator> <param desc="authenticationType"> <patch:delete/> ...

SSC API key is required. Pass with 'sc_apikey' query string or HTTP header error in Sitecore GraphQL Playground

 The Problem A friend of mine is working on upgrading Sitecore 9.3 to Sitecore 10.3.1. They are also upgrading to JSS 21.1 module. They wanted to ensure that all our GraphQL api endpoints keep functioning without breaking. When they opened GraphQL playground to test apis, they got the below errors -  SSC API key is required. Pass with 'sc_apikey' query string or HTTP header. Server cannot be reached Below is the snapshot of same -  We connected to solve their problem. The Solution We found that in JSS 16, when we supplied sc_apikey in page URL, it was passed on to GraphQL URL properly. But in JSS 21, which uses newer version of GraphQL, the sc_apikey in page URL query in browser was stripped off as in the snapshot above. To fix it, either you can manually specify the sc_key in the URL section in GraphQL playground or you can set the headers for sc_apikey in JSS 21.1. Check below snapshot for this - Hope it helps you!!