This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#B2C Variables | |
REACT_APP_CLIENT_ID = bd3b9e40-e453-42c3-b6e2-3ff7db552cae | |
REACT_APP_AUTHORITY = https://reactauth.b2clogin.com/tfp/reactauth.onmicrosoft.com/B2C_1_React_Authentication_Sign_In/ | |
REACT_APP_VALIDATE_AUTHORITY = false | |
REACT_APP_REDIRECT_URI = http://localhost:3000 | |
REACT_APP_POST_LOGOUT_REDIRECT_URI = http://localhost:3000 | |
REACT_APP_NAVIGATE_TO_LOGIN_REQUEST_URL = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export const AuthContext = React.createContext(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { UserAgentApplication } from 'msal'; | |
export const requiresInteraction = (errorMessage) => { | |
if (!errorMessage || !errorMessage.length) { | |
return false; | |
} | |
return ( | |
errorMessage.indexOf('consent_required') > -1 || | |
errorMessage.indexOf('interaction_required') > -1 || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { | |
msalApp, | |
requiresInteraction, | |
isIE, | |
AUTH_REQUESTS, | |
AUTH_SCOPES, | |
} from '../utils/auth-utils'; | |
import { AuthContext } from '../context/auth-context'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { AuthContext } from "../context/auth-context"; | |
class Login extends React.Component { | |
render() { | |
const auth = this.context; | |
return ( | |
<div> | |
<button | |
type="primary" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import AuthProvider from './providers/auth-provider'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import Login from "./pages/login"; | |
const App = () => { | |
return ( | |
<div className="App"> | |
<header className="App-header"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "./App.css"; | |
import { Form, Input, Button, Card, Row, Col } from "antd"; | |
import EmailService from "./services/email-service"; | |
const layout = { | |
labelCol: { span: 8 }, | |
wrapperCol: { span: 16 }, | |
}; | |
const App = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { send, init } from "emailjs-com"; | |
const serviceId = "service_f3o2n3g"; | |
const templateId = "template_bs8aqny"; | |
const userID = "user_xfurDErqsNWqF2NCZIAPz"; | |
const sendEmail = (content) => { | |
init(userID); | |
const toSend = { | |
from_name: content.from_name, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using localization_with_dotnet.Models; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
using System.Diagnostics; | |
namespace localization_with_dotnet.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
private readonly ILogger<HomeController> _logger; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse"> | |
<ul class="navbar-nav flex-grow-1"> | |
<li class="nav-item"> | |
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="AboutUs">About us</a> | |
</li> | |
<li class="nav-item"> | |
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Contact">Contact</a> | |
</li> | |
</ul> | |
</div> |
OlderNewer