Infinite redirect loop after scope change

I added the write_payment_terms scope to my app TryOnify. After accepting the permissions on a store, the app started redirecting infinitely until Shopify Admin showed a popup with the following message:
”This app can’t load due to an issue with browser cookies. Try enabling cookies in your browser or switching to another browser.”

I did some digging in the shopify_app gem and found this PR which describes my issue exactly:

cc @Paulo_Margarido

Marking this as solved because I made a mistake in ripping out the config.scope in my shopify_app.rb in /config/initializers.

Someone correctly pointed out here that the scopes must match what’s on the server:
https://community.shopify.com/t/embedded-app-oauth-redirect-endless-loop/16766/10