-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuth0.fsx
More file actions
30 lines (21 loc) · 838 Bytes
/
Auth0.fsx
File metadata and controls
30 lines (21 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#load "References.fsx"
open Fable.Core
open Fable.Core.JsInterop
open System
type IAuth0Error =
abstract member error: obj with get, set
abstract member errorDescription: string with get, set
type IAuth0UserProfile =
abstract member email: string with get, set
abstract member name: string with get, set
abstract member picture: string with get, set
type IAuthResult =
abstract idToken: string with get, set
type IAuth0Lock =
[<Emit"new $0($1...)">]
abstract Create: clientId: string * domain: string -> IAuth0Lock
abstract show: unit -> unit
[<Emit("$0.on('authenticated',$1...)")>]
abstract on_authenticated: callback: Func<IAuthResult, unit> -> unit
abstract getProfile: token: string * callback: Func<IAuth0Error, IAuth0UserProfile, unit> -> unit
let Auth0Lock: IAuth0Lock = importDefault "auth0-lock"