Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 629 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 629 Bytes

PeekAppSDK

This is a library to help with authenticating requests to and from PeekPro when writing apps.

Config:

config :peek_app_sdk,
  peek_app_secret: "APP_SECRET",
  peek_app_id: "APP_ID"

Some setup tips:

  • import PeekAppSDK.Plugs.PeekAuth in router
  • plug :set_peek_install_id can be used for routes that need to verify a peek request. This will set a peek_install_id prop in the assigns of the conn
  • live_session :some_live_view_session_scope, on_mount: {PeekAppSDK.Plugs.PeekAuth, :set_install_id_for_live_view} will set the peek_install_id on the Socket for live view usage.