{"id":4031,"date":"2021-02-22T04:27:15","date_gmt":"2021-02-22T04:27:15","guid":{"rendered":"https:\/\/studysection.com\/blog\/?p=4031"},"modified":"2021-02-22T04:27:15","modified_gmt":"2021-02-22T04:27:15","slug":"firebase-authentication-using-angular","status":"publish","type":"post","link":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/","title":{"rendered":"Firebase Authentication using Angular"},"content":{"rendered":"<p>Firebase provides a very simple way to set up authentication in web and mobile apps. It is very easy to integrate with your application and can be configured to be used with various different social authentication providers such as Facebook, Google, Github, Twitter, etc. By integrating these authentication providers, users can use their existing social accounts to perform the login on your web or mobile application. It also allows users to register with email and password or phone number accounts.   <\/p>\n<p>Before we start, make sure you have node js installed on your local machine.<\/p>\n<h2>Install Angular CLI<\/h2>\n<p><code>npm install -g @anguar\/cli<\/code><br \/>\nNext, create the Angular application.<br \/>\n<code>ng new firebase-authentication<\/code><br \/>\nOnce the Project is downloaded, move it into the project directory.<br \/>\n<code>cd firebase-authentication<\/code><br \/>\nMake Sure you have created the firebase account and add a new project.<br \/>\nInstall the Firebase Package in the Angular<br \/>\n<code>npm install @angular\/fire --save<\/code><br \/>\nAdd your Firebase configurations in the environment.ts file<br \/>\n<code>export const environment = {<br \/>\n  production: false,<br \/>\n  firebase: {<br \/>\n    apiKey: \"xxxxxxxx-xxxxxxxx\",<br \/>\n    authDomain: \"xxxxxxxxxxxxxxxxxxxxxxxx\",<br \/>\n    databaseURL: \"xxxxxxxxxxxxxxxxxxxxxxxx\",<br \/>\n    projectId: \"xxxxxxxx\",<br \/>\n    storageBucket: \"xxxxxxxx\",<br \/>\n    messagingSenderId: \"xxxxxx\",<br \/>\n    appId: \"xxxxx\",<br \/>\n    measurementId: \"xxxxxxxxxxxxxxxx\"<br \/>\n  }<br \/>\n};<\/code><br \/>\nImport and Register Angular modules in app.module.ts<br \/>\n<code>\/\/ Firebase services + environment module<br \/>\nimport { AngularFireModule } from \"@angular\/fire\";<br \/>\nimport { AngularFireAuthModule } from \"@angular\/fire\/auth\";<br \/>\nimport { AngularFirestoreModule } from '@angular\/fire\/firestore';<br \/>\nimport { environment } from '..\/environments\/environment';<br \/>\nimport { LoginComponent } from '.\/components\/login\/login.component';<br \/>\nimport { DashboardComponent } from '.\/components\/dashboard\/dashboard.component';<br \/>\n@NgModule({<br \/>\ndeclarations: [<br \/>\n    AppComponent,<br \/>\n    LoginComponent,<br \/>\n    DashboardComponent<br \/>\n  ],<br \/>\n  imports: [<br \/>\n    AngularFireModule.initializeApp(environment.firebase),<br \/>\n    AngularFireAuthModule,<br \/>\n    AngularFirestoreModule,<br \/>\n  ]\n})<\/code><br \/>\nGenerate the required components for the authentication<br \/>\n<code>ng g c components\/login<br \/>\nNg g c components\/dashboard<\/code><\/p>\n<p>Don&#8217;t Forget to create the routes in the app-routing.module.ts<br \/>\n<code>import { NgModule } from '@angular\/core';<br \/>\n\/\/ Required services for navigation<br \/>\nimport { Routes, RouterModule } from '@angular\/router';<br \/>\n\/\/ Import all the components for which navigation service has to be activated<br \/>\nimport { LoginComponent } from '..\/..\/components\/login\/sign-in.component';<br \/>\nimport { DashboardComponent } from '..\/..\/components\/dashboard\/dashboard.component';<br \/>\nconst routes: Routes = [<br \/>\n  { path: ' ', redirectTo: '\/login', pathMatch: 'full' },<br \/>\n  { path: 'dashboard', component: DashboardComponent },<br \/>\n  { path: 'login', component: LoginComponent }<br \/>\n];<br \/>\n@NgModule({<br \/>\n  imports: [RouterModule.forRoot(routes)],<br \/>\n  exports: [RouterModule]\n})<br \/>\nexport class AppRoutingModule { }<\/code><br \/>\nEnable the routes within view, add the following code in app.component.html file.<br \/>\n<code><router-outlet><\/router-outlet><\/code><br \/>\nCreate Firebase Authentication Service<br \/>\n<code>ng g s services\/auth<\/code><br \/>\nImport the required modules in auth.service.ts<br \/>\n<code>import { Injectable } from '@angular\/core';<br \/>\nimport { AngularFireAuth } from '@angular\/fire\/auth';<br \/>\nimport { Router } from '@angular\/router';<br \/>\n@Injectable({<br \/>\n  providedIn: 'root'<br \/>\n})<br \/>\nexport class AuthService {<br \/>\n  authState: any = null;<br \/>\n  constructor(private afu: AngularFireAuth, private router: Router) {<br \/>\n    this.afu.authState.subscribe((auth => {<br \/>\n      this.authState = auth;<br \/>\n    }))<br \/>\n  }<br \/>\n  loginWithEmail(email: string, password: string) {<br \/>\n    return this.afu.signInWithEmailAndPassword(email, password)<br \/>\n      .then((user) => {<br \/>\n        this.authState = true;<br \/>\n      })<br \/>\n      .catch(error => {<br \/>\n        throw error;<br \/>\n      })<br \/>\n  }<br \/>\n  get currentUserName(): string {<br \/>\n    return this.authState['email']\n  }<br \/>\n  get currentUser(): any {<br \/>\n    return (this.authState !== null) ? this.authState : null;<br \/>\n  }<br \/>\n}<\/code><br \/>\nNow, In login.component.ts add the required functions<br \/>\n<code>import { Component, OnInit } from '@angular\/core';<br \/>\nimport { ViewEncapsulation } from '@angular\/core';<br \/>\nimport { Router } from '@angular\/router';<br \/>\nimport { AuthService } from '..\/..\/services\/auth.service';<br \/>\nimport { ApiService } from '..\/..\/services\/api.service';<br \/>\n@Component({<br \/>\n  selector: 'app-login',<br \/>\n  templateUrl: '.\/login.component.html',<br \/>\n  styleUrls: ['.\/login.component.css'],<br \/>\n  encapsulation: ViewEncapsulation.None<br \/>\n})<br \/>\nexport class LoginComponent implements OnInit {<br \/>\n  public data: any;<br \/>\n  constructor(private authservice: AuthService, private router: Router) { }<br \/>\n  ngOnInit(): void {<br \/>\n  }<br \/>\n  email = \"\";<br \/>\n  password = \"\"<br \/>\n  login() {<br \/>\n      this.authservice.loginWithEmail(this.email, this.password)<br \/>\n        .then(() => {<br \/>\n          this.router.navigate(['\/dashboard']);<br \/>\n        }).catch(_error => {<br \/>\n          this.error = _error<br \/>\n          this.router.navigate(['\/login'])<br \/>\n        });<br \/>\n  }<br \/>\n}<\/code><br \/>\nNow add this html in the login.component.html<br \/>\n<code>&lt;form (ngSubmit)=\"login()\"><br \/>\n      &lt;div class=\"user-box\"><br \/>\n        &lt;input type=\"email\" name=\"email\" [(ngModel)]=\"email\" required=\"true\"><br \/>\n        &lt;label>Email&lt;\/label><br \/>\n      &lt;\/div><br \/>\n      &lt;div class=\"user-box\"><br \/>\n        &lt;input type=\"password\" name=\"password\" [(ngModel)]=\"password\" required=\"true\"><br \/>\n        &lt;label>Password&lt;\/label><br \/>\n      &lt;\/div><br \/>\n      &lt;button type=\"submit\" class=\"btn btn-primary\"><br \/>\n        &lt;span><\/span><br \/>\n       &lt;span><\/span><br \/>\n        &lt;span><\/span><br \/>\n        &lt;span><\/span><br \/>\n        Submit<br \/>\n    &lt;\/button><br \/>\n    &lt;\/form><\/code><br \/>\nIn dashboard.component.ts add the required Auth Service to get the logged-in user data.<br \/>\n<code>import { Component, OnInit } from '@angular\/core';<br \/>\nimport { AuthService } from '..\/..\/services\/auth.service';<br \/>\nimport { Router } from '@angular\/router';<br \/>\nimport { ViewEncapsulation } from '@angular\/core';<br \/>\n@Component({<br \/>\n  selector: 'app-dashboard',<br \/>\n  templateUrl: '.\/dashboard.component.html',<br \/>\n  styleUrls: ['.\/dashboard.component.css'],<br \/>\n  encapsulation: ViewEncapsulation.None<br \/>\n})<br \/>\nexport class DashboardComponent implements OnInit {<br \/>\n  constructor(public AuthService: AuthService) { }<br \/>\n  ngOnInit(): void {});<br \/>\n  }<br \/>\n}<\/code><br \/>\nIn dashboard.component.html add the following to get the user data<br \/>\n<code>&lt;h4 class=\"text-light \" id=\"welcome-user\" *ngIf = \"AuthService.currentUser\">&lt;span class=\"text-warning\">Welcome&lt;\/span>: {{AuthService.currentUserName}}&lt;\/h4><\/code><\/p>\n<p><small><em>People having good knowledge of Financial accounting can get an <a href=\"https:\/\/www.studysection.com\/financial-accounting-advanced\">Accounting Certification<\/a> from StudySection to increase their chances of getting a job in this field. You can get a foundation level certification if you are new to Financial accounting or you can go for advanced level certification if you have expert level skills in Financial accounting.<\/em><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firebase provides a very simple way to set up authentication in web and mobile apps. It is very easy to<\/p>\n","protected":false},"author":1,"featured_media":4032,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[499,629],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>StudySection Blog - Firebase Authentication using Angular<\/title>\n<meta name=\"description\" content=\"Firebase provides a very simple way to set up authentication in web and mobile apps. It is very easy to integrate with your application.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"StudySection Blog - Firebase Authentication using Angular\" \/>\n<meta property=\"og:description\" content=\"Firebase provides a very simple way to set up authentication in web and mobile apps. It is very easy to integrate with your application.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Posts on famous people, innovations and educational topics\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/studysection\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-22T04:27:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/02\/firebase.png\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin-studysection-blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@studysection\" \/>\n<meta name=\"twitter:site\" content=\"@studysection\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin-studysection-blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/\"},\"author\":{\"name\":\"admin-studysection-blog\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\"},\"headline\":\"Firebase Authentication using Angular\",\"datePublished\":\"2021-02-22T04:27:15+00:00\",\"dateModified\":\"2021-02-22T04:27:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/\"},\"wordCount\":300,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"keywords\":[\"Angular\",\"Firebase\"],\"articleSection\":[\"Learn and Grow\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/\",\"url\":\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/\",\"name\":\"StudySection Blog - Firebase Authentication using Angular\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/#website\"},\"datePublished\":\"2021-02-22T04:27:15+00:00\",\"dateModified\":\"2021-02-22T04:27:15+00:00\",\"description\":\"Firebase provides a very simple way to set up authentication in web and mobile apps. It is very easy to integrate with your application.\",\"breadcrumb\":{\"@id\":\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/studysection.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Firebase Authentication using Angular\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/studysection.com\/blog\/#website\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"name\":\"Blog Posts on famous people, innovations and educational topics\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/studysection.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/studysection.com\/blog\/#organization\",\"name\":\"StudySection\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"contentUrl\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"width\":920,\"height\":440,\"caption\":\"StudySection\"},\"image\":{\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/studysection\",\"https:\/\/twitter.com\/studysection\",\"https:\/\/www.instagram.com\/study.section\/\",\"https:\/\/www.linkedin.com\/company\/studysection\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\",\"name\":\"admin-studysection-blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"caption\":\"admin-studysection-blog\"},\"url\":\"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"StudySection Blog - Firebase Authentication using Angular","description":"Firebase provides a very simple way to set up authentication in web and mobile apps. It is very easy to integrate with your application.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/","og_locale":"en_US","og_type":"article","og_title":"StudySection Blog - Firebase Authentication using Angular","og_description":"Firebase provides a very simple way to set up authentication in web and mobile apps. It is very easy to integrate with your application.","og_url":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/","og_site_name":"Blog Posts on famous people, innovations and educational topics","article_publisher":"https:\/\/www.facebook.com\/studysection","article_published_time":"2021-02-22T04:27:15+00:00","og_image":[{"width":300,"height":200,"url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/02\/firebase.png","type":"image\/png"}],"author":"admin-studysection-blog","twitter_card":"summary_large_image","twitter_creator":"@studysection","twitter_site":"@studysection","twitter_misc":{"Written by":"admin-studysection-blog","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/#article","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/"},"author":{"name":"admin-studysection-blog","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402"},"headline":"Firebase Authentication using Angular","datePublished":"2021-02-22T04:27:15+00:00","dateModified":"2021-02-22T04:27:15+00:00","mainEntityOfPage":{"@id":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/"},"wordCount":300,"commentCount":0,"publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"keywords":["Angular","Firebase"],"articleSection":["Learn and Grow"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/","url":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/","name":"StudySection Blog - Firebase Authentication using Angular","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/#website"},"datePublished":"2021-02-22T04:27:15+00:00","dateModified":"2021-02-22T04:27:15+00:00","description":"Firebase provides a very simple way to set up authentication in web and mobile apps. It is very easy to integrate with your application.","breadcrumb":{"@id":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/studysection.com\/blog\/firebase-authentication-using-angular\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/studysection.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Firebase Authentication using Angular"}]},{"@type":"WebSite","@id":"https:\/\/studysection.com\/blog\/#website","url":"https:\/\/studysection.com\/blog\/","name":"Blog Posts on famous people, innovations and educational topics","description":"","publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/studysection.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/studysection.com\/blog\/#organization","name":"StudySection","url":"https:\/\/studysection.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","contentUrl":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","width":920,"height":440,"caption":"StudySection"},"image":{"@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/studysection","https:\/\/twitter.com\/studysection","https:\/\/www.instagram.com\/study.section\/","https:\/\/www.linkedin.com\/company\/studysection"]},{"@type":"Person","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402","name":"admin-studysection-blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","caption":"admin-studysection-blog"},"url":"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/"}]}},"views":278,"_links":{"self":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/4031"}],"collection":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/comments?post=4031"}],"version-history":[{"count":3,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/4031\/revisions"}],"predecessor-version":[{"id":4035,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/4031\/revisions\/4035"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media\/4032"}],"wp:attachment":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media?parent=4031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/categories?post=4031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/tags?post=4031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}