better-auth-university 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +33 -33
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,33 +1,33 @@
1
- # Better Auth University Plugin
2
-
3
- A university plugin for Better Auth that allows restriction of email domains.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install better-auth-university
9
- ```
10
-
11
- ## Setup
12
-
13
- To use the Better Auth University Plugin, you need to configure it with a list of universities and their associated email domains. You can also specify allowed email domains for user registration.
14
-
15
- If you would like a comprehensive list of universities, consider going to the [university-domains-list](https://github.com/Hipo/university-domains-list) for options of obtaining the data. There is a world_universities_and_domains.json which can be easily passed to the `university` parameter.
16
-
17
- ```typescript
18
- import { universityResolver } from "better-auth-university";
19
-
20
- const plugin = universityResolver({
21
- universities: [
22
- {
23
- name: "Massachusetts Institute of Technology",
24
- domains: ["mit.edu"],
25
- web_pages: ["http://web.mit.edu/"],
26
- country: "United States",
27
- alpha_two_code: "US",
28
- "state-province": "Massachusetts",
29
- },
30
- ],
31
- allowedEmailDomains: [".edu", ".ac.uk"],
32
- });
33
- ```
1
+ # Better Auth University Plugin
2
+
3
+ A university plugin for Better Auth that allows restriction of email domains.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install better-auth-university
9
+ ```
10
+
11
+ ## Setup
12
+
13
+ To use the Better Auth University Plugin, you need to configure it with a list of universities and their associated email domains. You can also specify allowed email domains for user registration.
14
+
15
+ If you would like a comprehensive list of universities, consider going to the [university-domains-list](https://github.com/Hipo/university-domains-list) for options of obtaining the data. There is a world_universities_and_domains.json which can be easily passed to the `university` parameter.
16
+
17
+ ```typescript
18
+ import { universityResolver } from "better-auth-university";
19
+
20
+ const plugin = universityResolver({
21
+ universities: [
22
+ {
23
+ name: "Massachusetts Institute of Technology",
24
+ domains: ["mit.edu"],
25
+ web_pages: ["http://web.mit.edu/"],
26
+ country: "United States",
27
+ alpha_two_code: "US",
28
+ "state-province": "Massachusetts",
29
+ },
30
+ ],
31
+ allowedEmailDomains: [".edu", ".ac.uk"],
32
+ });
33
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-auth-university",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "A university plugin for Better Auth that allows restriction of email domains.",
5
5
  "author": "Jaren Goldberg <fyrlex@gmail.com>",
6
6
  "main": "dist/index.js",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "homepage": "https://github.com/LuyxLLC/better-auth-university#readme",
45
45
  "peerDependencies": {
46
- "better-auth": "^1.4.7"
46
+ "better-auth": "^1.4.8"
47
47
  },
48
48
  "devDependencies": {
49
49
  "typescript": "^5.9.3"