claims from github auth hash: use(Himari::Middlewares::ClaimsRule, name: 'github-initialize') do |context, decision| next decision.skip!("provider not in scope") unless context.provider == 'github' decision.initialize_claims!( sub: "github_#{context.auth[:uid]}", name: context.auth[:info][:nickname], preferred_username: context.auth[:info][:nickname], email: context.auth[:info][:email], ) decision.user_data[:provider] = 'github' decision.continue! end