Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace remaining occurrences of isLoggedIn with isSignedIn #827

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/auth-express/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ For the router factories and route middleware, see the sections above for config
### `ExpressAuthSession`

- `client: Client`: `ext::auth::auth_token` global set based on the auth token that is present in the authentication cookie. If there is no cookie, the `Client` will be the original client that was passed when creating the `ExpressAuth` object.
- `isLoggedIn: () => Promise<boolean>`: Checks to see if this Request has a valid, unexpired auth token.
- `isSignedIn: () => Promise<boolean>`: Checks to see if this Request has a valid, unexpired auth token.

### `TokenData`

Expand Down
4 changes: 2 additions & 2 deletions packages/auth-nextjs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@

### Usage

Now you have auth all configured and user's can signin/signup/etc. you can use the `auth.getSession()` method in your app pages to retrieve an `AuthSession` object. This session object allows you to check if the user is currently logged in with the `isLoggedIn` method, and also provides a `Client` object automatically configured with the `ext::auth::client_token` global, so you can run queries using the `ext::auth::ClientTokenIdentity` of the currently signed in user.
Now you have auth all configured and user's can signin/signup/etc. you can use the `auth.getSession()` method in your app pages to retrieve an `AuthSession` object. This session object allows you to check if the user is currently logged in with the `isSignedIn` method, and also provides a `Client` object automatically configured with the `ext::auth::client_token` global, so you can run queries using the `ext::auth::ClientTokenIdentity` of the currently signed in user.

```ts
import { auth } from "@/edgedb";

export default async function Home() {
const session = await auth.getSession();

const loggedIn = await session.isLoggedIn();
const loggedIn = await session.isSignedIn();

return (
<main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { auth } from "@/edgedb";
export default async function Home() {
const session = auth.getSession();

const signedIn = await session.isLoggedIn();
const signedIn = await session.isSignedIn();

return (
<main className={styles.main}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { auth } from "@/edgedb";
export default async function Home() {
const session = auth.getSession();

const signedIn = await session.isLoggedIn();
const signedIn = await session.isSignedIn();

return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { auth } from "@/edgedb";
export default async function Home() {
const session = auth.getSession();

const signedIn = await session.isLoggedIn();
const signedIn = await session.isSignedIn();

return (
<main className={styles.main}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { auth } from "@/edgedb";
export default async function Home() {
const session = auth.getSession();

const signedIn = await session.isLoggedIn();
const signedIn = await session.isSignedIn();

return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
Expand Down
Loading