Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 878 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 878 Bytes

ueberauth_fake

This is a fake Ueberauth strategy for testing purposes. I use it for driving browser-based tests with wallaby without involving a full identity provider in my test runs.

Installation

At the moment, this is not available on Hex, so use a github reference:

def deps do
  [
    {:ueberauth_fake, github: "braunse/ueberauth_fake"}
  ]
end

Configuration

Make a user database module to look up information on your fake users. It has to conform to the Ueberauth.Strategy.Fake.UserDB behaviour.

Then, add a fake provider in your config/dev.exs:

config :ueberauth, Ueberauth, providers: [
  # ...,
  fake: {Ueberauth.Strategy.Fake, [
    user_db: My.UserDB.Module
  ]}
]

And to log in as user user42, send the browser to /auth/fake?user=user42