Skip to content

Commit

Permalink
Update api base url to api.authsignal.com (#43)
Browse files Browse the repository at this point in the history
* Update urls

* Bump version
  • Loading branch information
hwhmeikle committed Sep 19, 2023
1 parent e2a4dc6 commit 2858520
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

The Authsignal Browser API can be used to launch Authsignal's Challenge UI to let users set up MFA and complete challenges.

See the [documentation](https://docs.authsignal.com/api/browser-api) for details on how to use this SDK with the Authsignal Server APIs.
See the [documentation](https://docs.authsignal.com/sdks/client/browser-sdk) for details on how to use this SDK with the Authsignal Server APIs.

### Server SDKs
[NodeJS](https://www.npmjs.com/package/@authsignal/node)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@authsignal/browser",
"version": "0.2.2",
"version": "0.3.0",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
8 changes: 4 additions & 4 deletions src/api/passkey-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class PasskeyApiClient {
}

async registrationOptions({token, userName}: RegistrationOptsRequest): Promise<RegistrationOptsResponse> {
const response = await this.api.post("user-authenticators/passkey/registration-options", {
const response = await this.api.post("client/user-authenticators/passkey/registration-options", {
json: {username: userName},
headers: this.buildHeaders(token),
});
Expand All @@ -38,7 +38,7 @@ export class PasskeyApiClient {
}

async authenticationOptions({token}: AuthenticationOptsRequest): Promise<AuthenticationOptsResponse> {
const response = await this.api.post("user-authenticators/passkey/authentication-options", {
const response = await this.api.post("client/user-authenticators/passkey/authentication-options", {
json: {},
headers: this.buildHeaders(token),
});
Expand All @@ -47,7 +47,7 @@ export class PasskeyApiClient {
}

async addAuthenticator({token, ...rest}: AddAuthenticatorRequest): Promise<AddAuthenticatorResponse> {
const response = await this.api.post("user-authenticators/passkey", {
const response = await this.api.post("client/user-authenticators/passkey", {
json: rest,
headers: this.buildHeaders(token),
});
Expand All @@ -56,7 +56,7 @@ export class PasskeyApiClient {
}

async verify({token, ...rest}: VerifyRequest): Promise<VerifyResponse> {
const response = await this.api.post("verify/passkey", {
const response = await this.api.post("client/verify/passkey", {
json: rest,
headers: this.buildHeaders(token),
});
Expand Down
2 changes: 1 addition & 1 deletion src/authsignal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {Passkey} from "./passkey";

const DEFAULT_COOKIE_NAME = "__as_aid";

const DEFAULT_BASE_URL = "https://challenge.authsignal.com/v1";
const DEFAULT_BASE_URL = "https://api.authsignal.com/v1";

export class Authsignal {
anonymousId = "";
Expand Down

0 comments on commit 2858520

Please sign in to comment.