Skip to content

Commit 13e11b1

Browse files
Merge pull request #15 from AngCosmin/patch-1
Basic documentation for Auth
2 parents ad61ce7 + 4fa79a1 commit 13e11b1

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,25 @@ do {
9696
9797
### Auth
9898

99-
> Auth docs coming soon
99+
Sign up with email and password
100+
```swift
101+
client.auth.signUp(email: "[email protected]", password: "password") { result in
102+
switch result {
103+
case let .success(session, user): print(user)
104+
case let .failure(error): print(error.localizedDescription)
105+
}
106+
}
107+
```
108+
109+
Login up with email and password
110+
```swift
111+
client.auth.signIn(email: "[email protected]", password: "password") { result in
112+
switch result {
113+
case let .success(session): print(session.accessToken, session.user)
114+
case let .failure(error): print(error.localizedDescription)
115+
}
116+
}
117+
```
100118

101119
### Storage
102120

0 commit comments

Comments
 (0)