🔑 Authentication & Authorization const state = await wn.initialise({ permissions: { app: { name: “Demo”, creator: “Fission” },
})
}
// Ask the user permission for additional filesystem paths fs: { privatePaths: [ “Music” ], publicPaths: [ “Mixtapes” ] }
switch (state.scenario) { case wn.Scenario.AuthSucceeded: case wn.Scenario.Continuation: // We can now interact with our file system (more on that later) state.fs break; case wn.Scenario.NotAuthorised: wn.redirectToLobby(state.permissions) break; }