{"action":"closed","issue":{"url":"https://api.github.com/repos/nsarno/knock/issues/43","repository_url":"https://api.github.com/repos/nsarno/knock","labels_url":"https://api.github.com/repos/nsarno/knock/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/nsarno/knock/issues/43/comments","events_url":"https://api.github.com/repos/nsarno/knock/issues/43/events","html_url":"https://github.com/nsarno/knock/issues/43","id":137243600,"number":43,"title":"initializer broken by ruby-jwt api changes ","user":{"login":"subuta","id":6227288,"avatar_url":"https://avatars.githubusercontent.com/u/6227288?v=3","gravatar_id":"","url":"https://api.github.com/users/subuta","html_url":"https://github.com/subuta","followers_url":"https://api.github.com/users/subuta/followers","following_url":"https://api.github.com/users/subuta/following{/other_user}","gists_url":"https://api.github.com/users/subuta/gists{/gist_id}","starred_url":"https://api.github.com/users/subuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subuta/subscriptions","organizations_url":"https://api.github.com/users/subuta/orgs","repos_url":"https://api.github.com/users/subuta/repos","events_url":"https://api.github.com/users/subuta/events{/privacy}","received_events_url":"https://api.github.com/users/subuta/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-29T12:42:36Z","updated_at":"2016-04-08T00:46:23Z","closed_at":"2016-04-08T00:46:23Z","body":"I found [config.token_secret_signature_key](https://github.com/nsarno/knock/blob/11162c1549eabfdf1552b4d1c7dde993161ef9ff/lib/generators/templates/knock.rb#L77) was broken by ruby-jwt API updates ... \r\n```\r\n# config.token_secret_signature_key = -> { JWT.base64url_decode Rails.application.secrets.auth0_client_secret }\r\n```\r\n\r\nLatest ruby-jwt(v1.5.3) completely removes `base64url_decode ` method from JWT module(at this [PR](https://github.com/jwt/ruby-jwt/commit/7a7ac9a339f0a2967c6d9bcea7f6ccaa3661cf7e))\r\n\r\nBTW, We may use these work around as a temporary solution :)\r\n(we may have better solution for this problem...)\r\n\r\n```\r\nrequire 'base64'\r\n\r\n# extracted from original [method](http://www.rubydoc.info/github/jwt/ruby-jwt/JWT.base64url_decode)\r\nconfig.token_secret_signature_key = -> {\r\n    secret = Rails.application.secrets.auth0_client_secret\r\n    secret += '=' * (4 - secret.length.modulo(4))\r\n    Base64.decode64(secret.tr('-_', '+/'))\r\n  }\r\n```"}}