easy-addins-auth-client
A client side library which handles the oauth flows for office add-ins. utilizes socket.io.
Configuration
React apps are using .env
files. We're using these to configure the auth flows.
Example .env file for OneDrive configuration.
/// OneDrive has to come after OAUTH_ - rest is standard.
REACT_APP_OAUTH_ONEDRIVE=https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code&client_id=<client_id>&redirect_uri=<redirect_uri>
/// Pass the scopes for the oauth flow.
/// We might need to update this for supporting multiple oauth flows.
REACT_APP_OAUTH_SCOPES=Files.ReadWrite.AppFolder,offline_access
/// Socket server - what's the server we're communicating with...
REACT_APP_OAUTH_SOCKET_SERVER=<server_url>