Skip to content

Instantly share code, notes, and snippets.

View justinsoong's full-sized avatar

Justin Soong justinsoong

View GitHub Profile
@justinsoong
justinsoong / multiprovider.rb
Last active January 25, 2016 21:51
Multi OmniAuth Provider
class Identity < ActiveRecord::Base
belongs_to :user
validates_presence_of :uid, :provider
validates_uniqueness_of :uid, :scope => :provider
def self.find_for_oauth(auth)
find_or_create_by(uid: auth.uid, provider: auth.provider)
end
end
@justinsoong
justinsoong / AuthsignalMFA.xml
Created May 23, 2024 05:58 — forked from rbrayb/AuthsignalMFA.xml
Changing the MFA provider for Azure AD B2C
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrustFrameworkPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06" PolicySchemaVersion="0.3.0.0" TenantId="tenant.onmicrosoft.com" PolicyId="B2C_1A_AuthSignalMFA" PublicPolicyUri="http://tenant.onmicrosoft.com/B2C_1A_AuthSignalMFA"
DeploymentMode="Development"
UserJourneyRecorderEndpoint="urn:journeyrecorder:applicationinsights"
>
<BasePolicy>
<TenantId>tenant.onmicrosoft.com</TenantId>