Skip to content

Commit

Permalink
docs: update README to use better syntax for json code block (#1935)
Browse files Browse the repository at this point in the history
## What kind of change does this PR introduce?

This PR is to update `README` to use better syntax for `json` code
block.

## What is the current behavior?

Some of `json` code blocks aren't valid json format, e.g it shows
comments in red:

<img width="844" alt="image"
src="https://github.com/user-attachments/assets/a4a9a8ec-a8f3-4204-a212-605f7d9924f3"
/>

## What is the new behavior?

Use `js` syntax for `json` code block for better looking.

## Additional context

N/A
  • Loading branch information
burmecia authored Feb 6, 2025
1 parent 8078cdc commit e137365
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ Register a new user with an email and password.

returns:

```json
```js
{
"id": "11111111-2222-3333-4444-5555555555555",
"email": "[email protected]",
Expand All @@ -854,7 +854,7 @@ Register a new user with a phone number and password.

Returns:

```json
```js
{
"id": "11111111-2222-3333-4444-5555555555555", // if duplicate sign up, this ID will be faux
"phone": "12345678",
Expand Down Expand Up @@ -906,7 +906,7 @@ This endpoint requires the `service_role` or `supabase_admin` JWT set as an Auth

e.g.

```json
```js
headers: {
"Authorization" : "Bearer eyJhbGciOiJI...M3A90LCkxxtX9oNP9KZO"
}
Expand Down Expand Up @@ -996,7 +996,7 @@ query params:

User will be logged in and redirected to:

```json
```
SITE_URL/#access_token=jwt-token-representing-the-user&token_type=bearer&expires_in=3600&refresh_token=a-refresh-token&type=invite
```

Expand All @@ -1011,7 +1011,7 @@ One-Time-Password. Will deliver a magiclink or sms otp to the user depending on

If `"create_user": true`, user will not be automatically signed up if the user doesn't exist.

```json
```js
{
"phone": "12345678" // follows the E.164 format
"create_user": true
Expand All @@ -1020,7 +1020,7 @@ If `"create_user": true`, user will not be automatically signed up if the user d

OR

```json
```js
// exactly the same as /magiclink
{
"email": "[email protected]"
Expand Down Expand Up @@ -1087,7 +1087,7 @@ query params:

body:

```json
```js
// Email login
{
"email": "[email protected]",
Expand Down Expand Up @@ -1192,7 +1192,7 @@ If `GOTRUE_SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION` is enabled, the us

Sends a nonce to the user's email (preferred) or phone. This endpoint requires the user to be logged in / authenticated first. The user needs to have either an email or phone number for the nonce to be sent successfully.

```json
```js
headers: {
"Authorization" : "Bearer eyJhbGciOiJI...M3A90LCkxxtX9oNP9KZO"
}
Expand Down

0 comments on commit e137365

Please sign in to comment.