Git Product home page Git Product logo

contacts-react-native-client's Introduction

React Native Client for Contacts

The React Native Client for the Contacts application of the 'Coding with JoeG' stream.

Prerequisites

You will need to have Node.js and React Native installed and working.

This also assumes that you are using the Contacts Api so that the applications can interact with the contacts.

Running the samples

Open up a command prompt in the Contacts folder and execute the following command to install all of the required node modules

yarn install

Run the Web API locally. This should be configured to execute at https://localhost:5001

You will also need to create a file in the Contacts\msal folder names msalconfig.ts. This file contains the Microsoft Identity configuration. The file should contain the follow

const MsalConfig = {
    config: {
        // b2c configuration
        auth: {
            clientId: "", // TODO: Replace with your client id
            authority: "https://login.microsoftonline.com/common",
            redirectUri: "http://localhost:19006/Auth",
            navigateToLoginRequestUrl: false,
            validateAuthority: false
        },
        cache: {
            cacheLocation: "sessionStorage" // session storage is more secure, but prevents single-sign-on from working. other option is 'localStorage'
        } as const
    },
    // this is marked as the default, as the scopes for individual pages may be different
    // TODO: Replace these scopes with the scopes for your API.
    defaultRequestConfiguration: {
        scopes: ["api://dc68a11f-d265-4e9c-8a24-abbbd3520f8a/Contacts.Delete",
            "api://dc68a11f-d265-4e9c-8a24-abbbd3520f8a/Contacts.List",
            "api://dc68a11f-d265-4e9c-8a24-abbbd3520f8a/Contacts.Save",
            "api://dc68a11f-d265-4e9c-8a24-abbbd3520f8a/Contacts.Search",
            "api://dc68a11f-d265-4e9c-8a24-abbbd3520f8a/Contacts.View"]
    }
}
export default MsalConfig;

Once configured, you should be able to run

yarn web

to run the application.

Stream

This sample was built on the stream 'Coding with JoeG'. Here are some of the videos for it.

References

contacts-react-native-client's People

Contributors

jguadagno avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.