Skip to content

braunse/ueberauth_fake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A fake authentication strategy for Ueberauth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages