Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: glee authentication using auth directory #473

Closed
wants to merge 55 commits into from
Closed

feat: glee authentication using auth directory #473

wants to merge 55 commits into from

Conversation

oviecodes
Copy link
Contributor

Description
This PR continues the discussion on the glee authentication issue #377 , it continues the discussion about glee authentication, from #460 .

Following the idea from @Souvikns to use a separate directory for authentication. Each file in this directory can hold both server and client authentication logic.

/** auth/serverName.ts **/

export function serverAuth({headers, done}) {
  // write logic for authentication 
  done()
}

export function clientAuth() {
  return {
    username: '',
    password: ''
  }
}

Steps to test run authentication

  • In the glee root directory, cd examples/anime-http/server,
  • The server directory, contains an auth directory that holds a trendingAnimeServer.ts file. The file contains some logic you can edit how you like but it must export the same functions as the code above
  • npm run dev to start the server in dev mode
  • The same logic applies to the client directory, cd examples/anime-http/server
  • Then look for auth/trendingAnime.js update accordingly then start the server.

Related issue(s)
Resolves #377

@Souvikns @KhudaDad414

@sonarcloud
Copy link

sonarcloud bot commented Jul 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 12 Code Smells

No Coverage information No Coverage information
0.6% 0.6% Duplication

@oviecodes oviecodes closed this Jul 9, 2023
@oviecodes oviecodes deleted the v2GleeAuth branch July 10, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant