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
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Social sign-in for [fastauth](https://github.com/lassejlv/fastauth), as a plugin.
//!
//! ```no_run
//! # #[cfg(feature = "reqwest")]
//! # fn social() -> Result<fastauth_oauth::Social, fastauth_core::BuildError> {
//! use fastauth_core::value::Value;
//! use fastauth_oauth::{Github, Google, OAuthProviderExt, Social};
//!
//! let social = Social::new()
//! .provider(Github::new("client-id", "client-secret"))
//! .provider(Google::from_env()?.disable_sign_up(true))
//! .map_profile(|_profile, _provider| Ok(vec![("plan", Value::Text("free".into()))]));
//! # Ok(social)
//! # }
//! ```
//!
//! `map_profile` sets `user` columns that have no default when a sign-in creates a user;
//! `disable_sign_up` lets a provider sign existing users in without creating new ones.
//!
//! Register it with `.plugin(social)` and list it in the alias: `plugins![Social, ..]`. It serves
//! `POST /sign-in/social`, `GET /callback/{id}`, `POST /link-social`, `GET /list-accounts` and
//! `POST /unlink-account`, with the same paths and JSON as Better Auth.
pub use ReqwestClient;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;