What I learned on my Sitecore Hackathon journey

So you’re thinking about doing the Sitecore Hackathon ?

This year I had another crack at the Sitecore Hackathon, having done it a couple of years previously. I highly recommend it – not only is it fun (no really!) it’s also a great way to learn new things and get involved in the global Sitecore community. In a nutshell it’s a 24-hour coding marathon where you and two other teammates get together, eat pizza and attempt to build something new in Sitecore with the possible bonus of also winning a prize and the incredible fame and fortune that follows. (I made up that last bit, but there really are prizes.)

On my journey through this 24-hour marathon with my teammates I noticed a few things that I thought would be worth sharing which we either did and found useful (a short list) or wish we had done (a much longer list). Hope it helps someone next year.

Planning

  • With some foresight you can have a pretty good attempt at guessing what topics or product areas will be covered in the Hackathon. Announcements from last year’s Symposium are a good guide, or simply just whatever is a hot topic for blogs and Sitecore product webinars. This year, for example, JSS and Universal Tracker featured as ideas proposed for Hackathon entries, along with SXA, Commerce and some others. All four of those should have been fairly obvious choices.
  • Decide which of these areas you are comfortable with, or perhaps pick one that you want to learn! It’s a great opportunity to do stuff outside of your normal day job, get across new features and learn new things just for the heck of it.
  • Once you’ve had a think about what topics might be right for you and your team, do some R&D! For example, get JSS installed and spin up the sample app, or get SXA installed and watch some videos. If you change your mind, you haven’t lost anything and in fact you’ve learned something new.
  • Get together with your team and come up with some ideas about what might be a good project to develop within your areas of interest. What sort of thing could you build with JSS, given 24 hours and a lot of coffee?

Be prepared

  • Get the relevant version of Sitecore installed and working. Quite a few people were posting questions about how to install and configure 9.1 during the earlier parts of the Hackathon, which cost them valuable time that could have been saved by preparing an environment in advance.
  • Install the modules that you think you will be working on and make sure that they are configured. For example, make sure Universal Tracker is configured with client certificates and that it can push data to your development xConnect instance.
  • Check that you have access and can commit to the repository created for you by the Hackathon team. Do this before the Hackathon starts.
  • Make sure your team are all lined up ready to go at the agreed start time.
  • Choose a venue that you can all get to, with suitable transport and most importantly delicious options for Uber Eats and pizza deliveries 😊
  • What equipment will you need? Laptops (duh) and a video camera or suitable phone for making your submission video will be a good start. A/V adapters, USB sticks, and whatever else you think you might require.
  • Who is bringing what? One of my team had the foresight to bring snacks, drinks, and chocolates. We could have planned that better and shared the load.

On the day

  • Get together with your team an hour before the start time so that you can review the ideas sent out by the Hackathon organisers. Run through them and see what fits your previous R&D work (hopefully something!)
  • Get on the Slack channel and Twitter (#SCHackathon)
  • Come up with a rough plan of attack and decide who is going to start looking into different aspects.
  • Identify the tasks necessary to achieve your goal.
  • Put some rough estimates against these tasks and timebox them so you can decide whether or not to continue down a chosen path or to pull back and regroup.
  • Set some checkpoints for partway through the day to make sure you’re all travelling in the same direction. It’s easy to spend hours working on something and not even notice how fast the time has gone, so a checkpoint will keep you focused on how much time you have and what progress you are making.

Some other tips

  • Time flies. It really really does. You’ll look down at the screen at midday and then it will be 5pm but what happened in between ? Be conscious of time.
  • Don’t miss the deadline.  There are no extensions – you’re not in high school (are you?)
  • If at all possible, don’t leave your video and doco until 4 in the morning. You won’t be thinking straight and you’ll probably be like “oh yeah that’s good enough, just submit it”. (Not that we did that… no, of course not…). This is more of an issue in ANZ and Asia due to the timezone differences.
  • Read all the submission requirements and follow them, otherwise you could spend 24 hours working and then submit something that isn’t deemed to be “valid”. Make sure you’ve done the doco, the video, created a package and ticked all the boxes. At least 10 submissions didn’t make the cut this year due to not providing a Sitecore package.

Good luck for next year !

Fixing “unauthorized_client” on Sitecore Identity Server

When attempting to log into Sitecore 9.1 or 9.2 you might see the error “Sorry, there was an error: unauthorized client” on the Identity Server login screen:

This is probably because you’ve been redirected from the Sitecore login page and arrived at the Identity Server from a different hostname than that which was configured at the time the Sitecore infrastructure was deployed. For example, your site may have been deployed as https://test-sitecore-single.azurewebsites.net but later a more friendly hostname like https://testserver.myco.com was assigned to the Sitecore instance. When you try to log in via https://testserver.myco.com/sitecore you will be redirected to the Identity Server which does not recognize that host as an allowed origin.

To fix this, edit the following file in your Identity Server instance:

{siteroot}\Config\production\Sitecore.IdentityServer.Host.xml

and add your Sitecore URL to the AllowedOriginsGroup1 similarly to the example below:

<AllowedCorsOrigins>     
    <AllowedCorsOriginsGroup1>https://test-sitecore-single.azurewebsites.net|https://testserver.myco.com</AllowedCorsOriginsGroup1> 
</AllowedCorsOrigins> 

Note that the URLs are separated by a “|” (pipe) symbol.

You will also need to recycle your Identity Server instance because XML config files do not cause a recycle in the same way that Sitecore config files do. Also, delete any cookies that you have from the ID server and attempt to login again from the Sitecore login page. Otherwise the error message will still be displayed.

There are many other options for configuring the Identity Server which are documented here.