Skip to content

Commit

Permalink
cleaned up tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
sadasant committed Apr 9, 2022
1 parent 20e9928 commit 5fd06a7
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions sdk/identity/identity-spa/README.md
Expand Up @@ -25,21 +25,21 @@ async function main() {
redirectUri
});

// Activates the credential if a redirection has already been fulfilled.
// Activates the credential if a redirection has already been fulfilled.
await credential.onPageLoad();

const client = new ServiceBusClient(serviceBusEndpoint, credential);

// Service clients should expose their scopes.
const scopes = client.scopes;
// Service clients should expose their scopes.
const scopes = client.scopes;

try {
// If the redirection has already happened, client authentication will work.
const sender = client.createSender(queueName);
const sender = client.createSender(queueName);
await sender.sendMessages({ body: messageBody });
} catch(e) {
// If the redirection needs to happen,
// getToken will throw an `AuthenticationRequiredError` error.
// getToken will throw an `AuthenticationRequiredError` error.
if (e.name === "AuthenticationRequiredError") {
// Interactive authentication will happen via redirection once the authenticate() method is called.
await credential.authenticate(scopes);
Expand Down Expand Up @@ -69,12 +69,12 @@ async function main() {

const client = new ServiceBusClient(serviceBusEndpoint, credential);

// Service clients should expose their scopes.
const scopes = client.scopes;
// Service clients should expose their scopes.
const scopes = client.scopes;

try {
// Popup does not redirect, but most browsers will block popups by default.
const sender = client.createSender(queueName);
const sender = client.createSender(queueName);
await sender.sendMessages({ body: messageBody });
} catch(e) {
// If the popup authentication needs to happen, `getToken` will throw an `AuthenticationRequiredError` error.
Expand Down Expand Up @@ -159,12 +159,12 @@ async function main() {

const client = new ServiceBusClient(serviceBusEndpoint, credential);

// Service clients should expose their scopes.
const scopes = client.scopes;
// Service clients should expose their scopes.
const scopes = client.scopes;

try {
// If the redirection has already happened, client authentication will work.
const sender = client.createSender(queueName);
const sender = client.createSender(queueName);
await sender.sendMessages({ body: messageBody });
} catch(e) {
// If the redirection needs to happen, getToken will throw an `AuthenticationRequiredError` error.
Expand Down Expand Up @@ -212,12 +212,12 @@ async function main() {

const client = new ServiceBusClient(serviceBusEndpoint, credential);

// Service clients should expose their scopes.
const scopes = client.scopes;
// Service clients should expose their scopes.
const scopes = client.scopes;

try {
// If the redirection has already happened, client authentication will work.
const sender = client.createSender(queueName);
const sender = client.createSender(queueName);
await sender.sendMessages({ body: messageBody });
} catch(e) {
// If the popup authentication needs to happen, getToken will throw an `AuthenticationRequiredError` error.
Expand Down

0 comments on commit 5fd06a7

Please sign in to comment.