Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions apos.vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from '@apostrophecms/vite/vite';

export default defineConfig({
server: {
hmr: {
protocol: 'wss',
host: 'b75daf165449.ngrok.app',
},
origin: 'https://b75daf165449.ngrok.app',
cors: true,
strictPort: true
}
});
4 changes: 3 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import apostrophe from 'apostrophe';
apostrophe({
root: import.meta,
shortName: 'a4-boilerplate',
baseUrl: 'https://b75daf165449.ngrok.app',
modules: {
// Apostrophe module configuration
// *******************************
Expand Down Expand Up @@ -34,6 +35,7 @@ apostrophe({
// use vite for asset bundling and hot module reloading
'@apostrophecms/vite': {},
// The project's first custom page type.
'default-page': {}
'default-page': {},
'@apostrophecms/passport-bridge': {}
}
});
2 changes: 1 addition & 1 deletion modules/@apostrophecms/home-page/views/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% block main %}
<section class="bp-welcome">
<h1 class="bp-welcome__headline">
Welcome to ApostropheCMS
Welcome to ApostropheCMS, {{ data.user.title }}
</h1>
{% if not data.user %}
{# Message only for logged out users. #}
Expand Down
30 changes: 30 additions & 0 deletions modules/@apostrophecms/passport-bridge/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export default {
options: {
// optional
create: {
role: 'guest'
},
strategies: [
{
// You must npm install --save this module in your project first
module: 'passport-google-oauth20',
options: {
// Options for passport-google-oauth20
clientID: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET
},
// Ignore users whose email address does not match this domain
// according to the identity provider
emailDomain: 'apostrophecms.com',
// Use the user's email address as their identity
match: 'email',
// Strategy-specific options that must be passed to the authenticate middleware.
// See the documentation of the strategy module you are using
authenticate: {
// 'email' for the obvious, 'profile' for the displayName (for the create option)
scope: [ 'email', 'profile' ]
}
}
]
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@
"author": "Apostrophe Technologies, Inc.",
"license": "MIT",
"dependencies": {
"@apostrophecms/passport-bridge": "apostrophecms/passport-bridge#pro-8013",
"@apostrophecms/vite": "^1.0.0",
"apostrophe": "^4.9.0",
"normalize.css": "^8.0.1"
"normalize.css": "^8.0.1",
"passport-google-oauth20": "^2.0.0"
},
"devDependencies": {
"autoprefixer": "^10.4.20",
Expand Down