1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mod user;

pub use user::*;
use wasm_bindgen::prelude::*;

#[wasm_bindgen(module = "firebase/auth")]
extern "C" {
    pub type Auth;

    #[wasm_bindgen(js_name = getAuth)]
    pub fn get_auth() -> Auth;

    #[wasm_bindgen(js_name = onAuthStateChanged)]
    pub fn on_auth_state_changed(auth: Auth, callback: &Closure<dyn FnMut(Option<User>)>);
}